Why widget does not work after reboot?

前端 未结 2 1698
南笙
南笙 2021-01-03 12:47

I have this simple widget and when I click on it, it should open my activity, it works, but it doesn\'t work after reboot. I must delete and then again add widget to my home

2条回答
  •  孤街浪徒
    2021-01-03 12:57

    The AppWidgetProvider which widgets inherit calls onUpdate on startup when it receives ACTION_APPWIDGET_UPDATE from the operating system.

    If you override onReceive without calling super.onReceive(), you would need to intercept this Intent on your own.

提交回复
热议问题