Problem in identifying which widget click is launching the activity?

by dark_messiah » Mon, 08 Jun 2009 15:06:35 GMT


Sponsored Links
 I m creating my own widget...widget initial  layout contains one
button...when i click on that widget button it shud launch the
specified activity using service...everythng is working fine..but the
problem comes when there are 2 or more widget on home screen...when i
clicking on any one of them i m not able to specify with widget is
launching the activity...Please help???
--~--~---------~--~----~------------~-------~--~----~



Problem in identifying which widget click is launching the activity?

by Mark Murphy » Mon, 08 Jun 2009 19:39:52 GMT


 


Put the app-widget instance ID as an extra in the Intent you wrap with a
PendingIntent that associated with your button.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

_Android Programming Tutorials_ Version 0.95 Available!

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Other Threads

1. Sqlite delete row problem

Hi
I'm using sqlite for my app.
I'm using extensive cursors in my app and i have taken care to close
all of them after use.
I'm enumerating cursor with clause "order by".
then i'm trying to delete a row from the resp. table.
Whenever I'm trying to delete a row in a database, I'm observing 2
rows are deleted from the database.
Even, though there is a single row matching a constraint.
The extra row deleted is observed to be a row right after next or
before the a row that is matching a constraint and should be deleted.
What could be the problem??
Thanks in advance.

-- 

2. Isi data owner

Bagaimana mengisi data kita supaya tampil di layar ada saat keylok nexus 1?
This phone belongs to......
Makasih

-- 
"Indonesian Android Community [id-android]" 

3. Max resolution for a game always?

4. EXTRA_STREAM: Attachment URI size 0

5. perlu superuser setelah root N1?

6. How to properly detect rooted phone?

7. butuh ide buat bikin software di android