Skip to content
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

Samsung Note 9 Android 10 #79

Open
petrofahed opened this issue Nov 11, 2021 · 0 comments
Open

Samsung Note 9 Android 10 #79

petrofahed opened this issue Nov 11, 2021 · 0 comments

Comments

@petrofahed
Copy link

petrofahed commented Nov 11, 2021

Hello,

My note 9 used to work but suddenly (looks like after some android SDK / NuGet updates) it is not working.

return true --> AutoStartPermissionHelper.Instance.IsAutoStartPermissionAvailable(Android.App.Application.Context);
return false --> AutoStartPermissionHelper.Instance.GetAutoStartPermission(Android.App.Application.Context);

any insight on how to fix this one? thank you for your help!

below is the issue that is printing on the log:

[System.err] android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
[System.err] at android.app.ContextImpl.startActivity(ContextImpl.java:995)
[System.err] at android.app.ContextImpl.startActivity(ContextImpl.java:971)
[System.err] at android.content.ContextWrapper.startActivity(ContextWrapper.java:389)
[System.err] at com.judemanutd.autostarter.AutoStartPermissionHelper.startIntent(AutoStartPermissionHelper.kt:325)
[System.err] at com.judemanutd.autostarter.AutoStartPermissionHelper.autoStartSamsung(AutoStartPermissionHelper.kt:293)
[System.err] at com.judemanutd.autostarter.AutoStartPermissionHelper.getAutoStartPermission(AutoStartPermissionHelper.kt:116)
[System.err] at crc64e4c1bdf423372b33.MainActivity.n_onCreate(Native Method)
[System.err] at crc64e4c1bdf423372b33.MainActivity.onCreate(MainActivity.java:40)
[System.err] at android.app.Activity.performCreate(Activity.java:7963)
[System.err] at android.app.Activity.performCreate(Activity.java:7952)
[System.err] at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
[System.err] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3629)
[System.err] at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3806)
[System.err] at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
[System.err] at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
[System.err] at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
[System.err] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2267)
[System.err] at android.os.Handler.dispatchMessage(Handler.java:107)
[System.err] at android.os.Looper.loop(Looper.java:237)
[System.err] at android.app.ActivityThread.main(ActivityThread.java:8167)
[System.err] at java.lang.reflect.Method.invoke(Native Method)
[System.err] at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
[System.err] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
[System.err] android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
[System.err] at android.app.ContextImpl.startActivity(ContextImpl.java:995)
[System.err] at android.app.ContextImpl.startActivity(ContextImpl.java:971)
[System.err] at android.content.ContextWrapper.startActivity(ContextWrapper.java:389)
[System.err] at com.judemanutd.autostarter.AutoStartPermissionHelper.startIntent(AutoStartPermissionHelper.kt:325)
[System.err] at com.judemanutd.autostarter.AutoStartPermissionHelper.autoStartSamsung(AutoStartPermissionHelper.kt:293)
[System.err] at com.judemanutd.autostarter.AutoStartPermissionHelper.getAutoStartPermission(AutoStartPermissionHelper.kt:116)
[System.err] at crc64e4c1bdf423372b33.MainActivity.n_onCreate(Native Method)
[System.err] at crc64e4c1bdf423372b33.MainActivity.onCreate(MainActivity.java:40)
[System.err] at android.app.Activity.performCreate(Activity.java:7963)
[System.err] at android.app.Activity.performCreate(Activity.java:7952)
[System.err] at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
[System.err] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3629)
[System.err] at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3806)
[System.err] at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
[System.err] at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
[System.err] at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
[System.err] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2267)
[System.err] at android.os.Handler.dispatchMessage(Handler.java:107)
[System.err] at android.os.Looper.loop(Looper.java:237)
[System.err] at android.app.ActivityThread.main(ActivityThread.java:8167)
[System.err] at java.lang.reflect.Method.invoke(Native Method)
[System.err] at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
[System.err] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant