Skip to content

Commit 41e560e

Browse files
committed
Removed redundant code
- fixed deep link issue on Android in the sample app
1 parent 8fd997d commit 41e560e

File tree

2 files changed

+0
-54
lines changed

2 files changed

+0
-54
lines changed

android/src/main/java/com/appsflyer/appsflyersdk/AppsflyerSdkPlugin.java

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -52,45 +52,8 @@ public class AppsflyerSdkPlugin implements MethodCallHandler, FlutterPlugin, Act
5252
private Context mContext;
5353
private Application mApplication;
5454
private Intent mIntent;
55-
//private BroadcastReceiver mBroonAttachToEngineadcastReceiver;
5655
private MethodChannel mMethodChannel;
5756

58-
//private static AppsflyerSdkPlugin instance = null;
59-
60-
// AppsflyerSdkPlugin(Registrar registrar) {
61-
// this.mFlutterView = registrar.view();
62-
// this.mContext = registrar.activity().getApplicationContext();
63-
// this.mApplication = registrar.activity().getApplication();
64-
// this.mIntent = registrar.activity().getIntent();
65-
// this.mEventChannel = new EventChannel(registrar.messenger(), AF_EVENTS_CHANNEL);
66-
// mEventChannel.setStreamHandler(new AppsFlyerStreamHandler(mContext));
67-
// }
68-
69-
// public static void registerWith(Registrar registrar) {
70-
//
71-
// if (instance == null) {
72-
// instance = new AppsflyerSdkPlugin(registrar);
73-
// }
74-
//
75-
// final MethodChannel channel = new MethodChannel(registrar.messenger(), AppsFlyerConstants.AF_METHOD_CHANNEL);
76-
//
77-
// channel.setMethodCallHandler(instance);
78-
// }
79-
80-
/** Plugin registration. */
81-
public static void registerWith(PluginRegistry.Registrar registrar) {
82-
final AppsflyerSdkPlugin instance = new AppsflyerSdkPlugin();
83-
84-
instance.onAttachedToEngine(registrar.activity(),registrar.context(), registrar.messenger());
85-
}
86-
87-
private void onAttachedToEngine(Activity activity, Context applicationContext, BinaryMessenger messenger) {
88-
this.mContext = applicationContext;
89-
this.mApplication = activity.getApplication();
90-
this.mIntent = activity.getIntent();
91-
onAttachedToEngine(applicationContext,messenger);
92-
}
93-
9457
private void onAttachedToEngine(Context applicationContext, BinaryMessenger messenger) {
9558
this.mContext = applicationContext;
9659
this.mEventChannel = new EventChannel(messenger, AF_EVENTS_CHANNEL);
@@ -121,9 +84,6 @@ public void onMethodCall(MethodCall call, Result result) {
12184
case "stopTracking":
12285
stopTracking(call, result);
12386
break;
124-
// case "enableUninstallTracking":
125-
// enableUninstallTracking(call, result);
126-
// break;
12787
case "updateServerUninstallToken":
12888
updateServerUninstallToken(call, result);
12989
break;
@@ -145,9 +105,6 @@ public void onMethodCall(MethodCall call, Result result) {
145105
case "setAdditionalData":
146106
setAdditionalData(call, result);
147107
break;
148-
// case "setUserEmails":
149-
// setUserEmails(call, result);
150-
// break;
151108
case "setUserEmailsWithCryptType":
152109
setUserEmailsWithCryptType(call, result);
153110
case "setCollectAndroidId":

example/android/app/src/main/java/com/appsflyer/appsflyersdkexample/MainActivity.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,4 @@
1414
import io.flutter.plugins.GeneratedPluginRegistrant;
1515

1616
public class MainActivity extends FlutterActivity {
17-
@Override
18-
protected void onCreate(Bundle savedInstanceState) {
19-
super.onCreate(savedInstanceState);
20-
AppsFlyerLib.getInstance().sendDeepLinkData(this);
21-
}
22-
23-
@Override
24-
public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) {
25-
GeneratedPluginRegistrant.registerWith(flutterEngine);
26-
}
27-
2817
}

0 commit comments

Comments
 (0)