Do you know on how to link an image from current widget and link it to specified url?
I’ve been searching for the solution in Google, could not found the exact solution.
Im now developing a simple widget.. Its really new for me, Im not really understand on how to use the AppWidgetProvider
My current widget is only displaying image which it will directly link to a website when user click it..
So, my question is, which of these should I use in AppWidgetProvider ?
As we know there are 4 of them..
- onDeleted(context)
- onDisabled(context)
- onUpdated(context)
- onReceived(context)
can u explain a bit more about it? and the steps for me to make the code for linking the image to website.
thanks friends
Indeed this won’t work for
AppWidgets. You should callsetOnClickPendingIntent()on yourRemoteViewsinstance, passing it theImageViewid and the followingPendingIntentobject:Here’s the documentation for the method. Hope this helps.