File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
android/src/main/java/com/mixpanel/mixpanel_flutter Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBindin
4747 // Store references for lazy initialization to avoid ANR during plugin registration
4848 this .flutterPluginBinding = flutterPluginBinding ;
4949 this .context = flutterPluginBinding .getApplicationContext ();
50+
51+ initializeMethodChannel ();
5052 }
5153
5254 @ Override
@@ -189,9 +191,6 @@ private void initializeMethodChannel() {
189191 }
190192
191193 private void handleInitialize (MethodCall call , Result result ) {
192- // Lazy initialization of MethodChannel to avoid ANR
193- initializeMethodChannel ();
194-
195194 final String token = call .argument ("token" );
196195 if (token == null ) {
197196 throw new RuntimeException ("Your Mixpanel Token was not set" );
You can’t perform that action at this time.
0 commit comments