Android AppWidgetProvider's onReceive method never gets called

你。 提交于 2019-12-04 12:05:30

If you are using a configure activity in you provider as below, please remember to setOnClickPendingIntent() in you configure activity, or onReceive() method won't be called later, even if the other things are all correct.

<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
                    android:minWidth="40dp"
                    android:minHeight="40dp"
                    android:updatePeriodMillis="86400000"
                    android:previewImage="@drawable/icon"
                    android:initialLayout="@layout/appwidget"
                    android:configure="AppWidgetConfigure"
                    android:resizeMode="horizontal|vertical"
                    android:widgetCategory="home_screen">
</appwidget-provider>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!