Android onEnabled/onDisabled never called

别等时光非礼了梦想. 提交于 2019-12-04 10:04:22

Okay, removing my app from the phone did the trick. Can't understand why uninstall fixed it. With anyone having the same problem, uninstall and reinstall your app.

I know this is an old post, but it seems that the problem is the onReceive(Context context, Intent intent) method.

As it appears, it takes precedence in handling receiver's events, preventing AppWidgetProvider's designated methods from being called upon receiving action.

There are two possible solutions; either handle intent's action in the onReceive method, or remove the method and override the designated action methods.

Do not forget to include the actions in the intent-filter.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!