-
-
Notifications
You must be signed in to change notification settings - Fork 663
Fix MissingPluginException due to FlutterActivity reference #292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Fix MissingPluginException due to FlutterActivity reference #292
Conversation
@AmolGangadhare @izzyaf @ahmadjehad anyone willing to review/merge this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good clean up
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
FlutterActivity
toandroid.app.Activity
.This fixes the following issues: #287 #283 #281 #209
The solution of changing
FlutterActivity
toFlutterFragmentActivity
has been proposed in various comments but it's not actually needed since the reference is only used to callrunOnUiThread()
so usingandroid.app.Activity
is enough and provides the best compatibility.