Android:NPE while trying to activityForResult with ACTION_APPWIDGET_PICK intent

后端 未结 3 1745
悲哀的现实
悲哀的现实 2021-01-21 09:05

I have a problem then trying to put an intent with AppWidgetManager.ACTION_APPWIDGET_PICK there is a problem somethere inside of android AppWidget ecosystem as I ca

相关标签:
3条回答
  • 2021-01-21 09:18

    Looks like a bug in android settings, if you trying to pick appwidget without any extra widgets specified you'll fail, filled an issue at google code link

    0 讨论(0)
  • 2021-01-21 09:29

    Edit: spoke too soon, didn't see it was a ViewListener method. Don't know if that's still required.


    Original answer:

    You should call the Acitivy's onClick in your override.

    From the Android docs: "An implementation of any activity lifecycle method should always first call the superclass version.

    Hope that solves the problem.

    0 讨论(0)
  • 2021-01-21 09:33

    Did you determine a workaround? I've seen apps which implement the appwidget picker to run appwidget host in their activity, and I am now receiving this exact error stating EXTRA_CUSTOM_INFO is not present. I am testing some things from the Launcher source usage of this and will report back if I can workaround the error at least.

    0 讨论(0)
提交回复
热议问题