Skip to content

PlatformException on Android 8.1 Oreo device #24

@tomc128

Description

@tomc128

Hey, I'm using system_settings in a production app, and I'm recieved a couple reports in Crashlytics of a PlatformException when calling SystemSettings.appNotifications() (No Activity found to handle Intent).

Stack trace
Fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: PlatformException(error, No Activity found to handle Intent { act=android.settings.APP_NOTIFICATION_SETTINGS flg=0x10000000 (has extras) }, null, android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.settings.APP_NOTIFICATION_SETTINGS flg=0x10000000 (has extras) }
	at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1956)
	at android.app.Instrumentation.execStartActivity(Instrumentation.java:1624)
	at android.app.ContextImpl.startActivity(ContextImpl.java:897)
	at android.app.ContextImpl.startActivity(ContextImpl.java:874)
	at android.content.ContextWrapper.startActivity(ContextWrapper.java:372)
	at q3.a.a(Unknown Source:96)
	at q3.a.onMethodCall(Unknown Source:345)
	at f4.k$a.a(Unknown Source:17)
	at s3.c.l(Unknown Source:18)
	at s3.c.m(Unknown Source:40)
	at s3.c.i(Unknown Source:0)
	at s3.b.run(Unknown Source:12)
	at android.os.Handler.handleCallback(Handler.java:790)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:167)
	at android.app.ActivityThread.main(ActivityThread.java:7145)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:820)
)
       at StandardMethodCodec.decodeEnvelope(message_codecs.dart:652)
       at MethodChannel._invokeMethod(platform_channel.dart:310)
       at SystemSettings.appNotifications(system_settings.dart:17)

Wrapping the statement in a try/catch block does not successfully catch the error, so I think this must be an issue within the package (please correct me if I'm wrong)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions