Fix MissingPluginException due to FlutterActivity reference#292
Fix MissingPluginException due to FlutterActivity reference#292mauriziopinotti wants to merge 2 commits into
Conversation
|
@AmolGangadhare @izzyaf @ahmadjehad anyone willing to review/merge this? |
|
Can anyone merge this PR please? this fix is critical for the lib to work in Android. Thanks!!! |
|
Hi, the file does not have the change in all the necessary places and is still causing the issue. This is how I changed it to work for me. `package com.amolg.flutterbarcodescanner; import android.app.Activity; import androidx.annotation.NonNull; import com.google.android.gms.common.api.CommonStatusCodes; import java.util.Map; import io.flutter.embedding.engine.plugins.FlutterPlugin; /**
|
|
use this forked version until the author merges the changes
|
Changed all references to
FlutterActivitytoandroid.app.Activity.This fixes the following issues: #287 #283 #281 #209
The solution of changing
FlutterActivitytoFlutterFragmentActivityhas been proposed in various comments but it's not actually needed since the reference is only used to callrunOnUiThread()so usingandroid.app.Activityis enough and provides the best compatibility.