justdave / nwsweatheralertswidget

Android home screen widget to display current weather alerts from the US National Weather Service
http://justdave.github.io/nwsweatheralertswidget/
Apache License 2.0
14 stars 6 forks source link

No Activity found to handle Intent android.intent.action.VIEW #15

Closed justdave closed 8 years ago

justdave commented 10 years ago

Reported on the following OSes:

android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat= flg=0x10000000 }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1622)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1417)
at android.app.ContextImpl.startActivity(ContextImpl.java:949)
at android.app.ContextImpl.startActivity(ContextImpl.java:931)
at net.justdave.nwsweatheralertswidget.NWSAlertListViewAdapter$1.onClick(NWSAlertListViewAdapter.java:57)
at android.view.View.performClick(View.java:4207)
at android.view.View$PerformClick.run(View.java:17358)
at android.os.Handler.handleCallback(Handler.java:725)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
justdave commented 10 years ago

I don't see any way this could actually happen unless an alert button ends up with a malformed URL that doesn't start with a valid protocol. That's quite likely possible, if an alert gets set up with a broken URL in it. Probably the only way to deal with this is to validate the URLs before adding them to the buttons.

justdave commented 10 years ago

Updated crash statistics:

Android 4.4 13 46.4% Android 4.2 6 21.4% Android 4.1 6 21.4% Android 4.0.3 - 4.0.4 3 10.7%

justdave commented 8 years ago

This crash appears to be related to the widget opening the NWS website to view the alerts. Reports of this crashed stopped when the version of the app which displays the alert text internally in the app was released.