I’m working off this tutorial: http://www.developer.com/ws/article.php/10927_3833306_2/Creating-a-Home-Screen-App-Widget-on-Android.htm
It includes the following code:
widgetUpdate.setData(
Uri.withAppendedPath(Uri.parse(
ImagesWidgetProvider.URI_SCHEME + "://widget/id/"),
String.valueOf(appWidgetId)));
My question is, what should URI_SCHEME be defined as and where?
You define value of uri scheme as some UNIQUE string for your application.
It MUST have to be defined in your menifest file:
Example here
Then, for convenience, you may put that value in some variable (even better if static final) of your code:
Check here
Note that, UNIQUE scheme string definition in manifest xml is compulsory. The definition in class member variable is not compulsory. but, it is a very very very good practice.