[英]How do you find a widget ID without an implemented widget provider?
基本上,我已经使用RemoteView
创建了自定义通知,并且需要定期在该远程视图中更新TextView
。
据我了解,我需要通过AppWidgetManager
来更新RemoteView
,更具体地说是使用partiallyUpdateAppWidget (int appWidgetId, RemoteViews views)
方法partiallyUpdateAppWidget (int appWidgetId, RemoteViews views)
没有AppWidgetProvider
有没有办法提供正确的appWidgetId
?
要更新通知(无论是与之关联的RemoteView
还是任何通知字段本身),必须重新创建整个通知,并使用与先前添加的ID相同的ID调用notificationManager.notify()
。 这将更新到位的通知。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.