简体   繁体   中英

Widget in some android phone can not receive broadcast in AppWidgetProvider when app has been killed

In the commom way, we receive events invoked by widget in AppWidgetProvider which is a BroadcastReceiver.But some Android Device can't not receive broadcast in AppWidgetProvider when the app is kill.

Any kind people can offer me some help?

Now I know how to fix it.

In AppWidgetProvider, I use PendingIntent.getService instead of PendingIntent.getBroadcast to bind event to RemoteView. And I handle the event from widget in a service.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM