I have a widget with 3 pictures. Each picture describe a different things.
I have a class with just a webviewer inside. I want that if the user touch the first picture, the webviewer is launched to the address 1, 2 if it's the second picture, etc.
Intent i = new Intent(context, WebViewTestActivity.class);
i.putExtra("url", "http://www.google.com");
PendingIntent pi = PendingIntent.getActivity(context,0, i,0);
views.setOnClickPendingIntent(R.id.img1, pi);
The problem is in the class with the webviewer, i take the url from the extra value of the intent. But how can i add three url with the same "key" (url) and how i can know that the user click on the first image, the second image etc... on the webviewer class ?
Thanks.
EDIT :
I found the solution here :
Processing more than one button click at Android Widget
use i.setAction("url1...."); (with i your intent)
Thanks