Creating a Home Screen App Widget on Android - Developer.com - 0 views
-
The Android system reuses Intents that match both action and scheme values—the "extras" values are not compared
-
Vincent Tsao on 10 Jul 10通过设置不同scheme来区别不同的intent
-
-
In practice, this means the Intent for each App Widget identifier would actually be the same Intent. Fortunately, the solution is straightforward: define a scheme for your App Widget and use it to define unique Intent instances
-
// make this pending intent unique widgetUpdate.setData( Uri.withAppendedPath(Uri.parse( ImagesWidgetProvider.URI_SCHEME + "://widget/id/"), String.valueOf(appWidgetId)));