Ficik
Ficik

Reputation: 148

Android (App)Widget identification

Im writing little widget that shows time, date.. with many settings. And I want to have multiple instances of this widget with diferent settings. Is there any way to identify widget instance. I mean is it posible to set persistant id on witget instance so Ill know on update that I have to use setting for for example witget one?

Upvotes: 2

Views: 2616

Answers (2)

Anand Sainath
Anand Sainath

Reputation: 1807

You might also want to consider a configuration activity that will launch every time an instance of your widget is created, you can configure what time (or) details the user wants on the screen.

Upvotes: 0

SteelBytes
SteelBytes

Reputation: 6965

yes.

if you read the tutorial at http://developer.android.com/guide/topics/appwidgets/index.html#Configuring you'll see many references to mAppWidgetId/appWidgetIds/etc. This is a unique Id per instance of your widget. you can associate this Id with your configuration info.

Upvotes: 3

Related Questions