@@ -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" :
0 commit comments