-
Notifications
You must be signed in to change notification settings - Fork 115
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
AndroidRuntimeException: Calling startActivity() #42
Comments
I am also facing the same issue and unable to use this plugin, what is the fix for this? I am getting this issue for getAutoStartPermission() for One Plus, Redmi |
@minuhariharan could you take a look at the steps mentioned in #47 (comment) and post the results here once you have them, this should allow for better debugging. |
The same thing. I'm calling getAutoStartPermission() from foreground service and it cannot be done without FLAG_ACTIVITY_NEW_TASK for intent |
This should be resolved by #69 |
Hi,
I'm using this library via a flutter plugin.
Device: OnePlus 7 GM1901
OS: Oxygen OS 10.3.2GM57AA
it returns true for isAutoStartPermissionAvailable
any help is appreciated.
Logs :
W/System.err(28183): android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want? W/System.err(28183): at android.app.ContextImpl.startActivity(ContextImpl.java:964) W/System.err(28183): at android.app.ContextImpl.startActivity(ContextImpl.java:940) W/System.err(28183): at android.content.ContextWrapper.startActivity(ContextWrapper.java:383) W/System.err(28183): at com.judemanutd.autostarter.AutoStartPermissionHelper.startIntent(AutoStartPermissionHelper.kt:325) W/System.err(28183): at com.judemanutd.autostarter.AutoStartPermissionHelper.autoStartOnePlus(AutoStartPermissionHelper.kt:308) W/System.err(28183): at com.judemanutd.autostarter.AutoStartPermissionHelper.getAutoStartPermission(AutoStartPermissionHelper.kt:118) W/System.err(28183): at com.yin.autostart.AutostartPlugin.onMethodCall(AutostartPlugin.java:53)
The text was updated successfully, but these errors were encountered: