Questions tagged [appwidgetprovider]

A convenience class in Android to aid in implementing an AppWidget provider.

From the API page.

A convenience class to aid in implementing an AppWidget provider. Everything you can do with AppWidgetProvider, you can do with a regular BroadcastReceiver. AppWidgetProvider merely parses the relevant fields out of the Intent that is received in onReceive(Context,Intent), and calls hook methods with the received extras.

191 questions
18
votes
3 answers

Android: loading WebView output into App Widget

Whilst I appreciate that an App Widget does not support a WebView directly, is it at all possible to use an ImageView (which is supported), and a technique like described here to generate the image for the ImageView? The WebView wouldn't be used…
drmrbrewer
  • 11,491
  • 21
  • 85
  • 181
17
votes
1 answer

Screen on/off broadcast listener for a widget on Android Oreo

I have a clock widget Android app which I am now trying to update to API 26 requirements. Up to now I used a background service which registered upon start in its onCreate method a BroadcastReceiver to receive system broadcasts, such as…
16
votes
2 answers

How to update App Widget with list view from an Activity

I know this has been asked for many times but I went through the documentation from top to bottom, read all answers here and none of them helped. To be honest, each answer says something different about how to aproach this. Now back to my…
user219882
  • 15,274
  • 23
  • 93
  • 138
16
votes
1 answer

Android widget works well in emulator but on phone it turns into the Google App widget

I created an Android widget. In a Genymotion Nexus 4 emulator running Android 4.4.4 everything works well. On my Nexus 4 device running Android 4.4.4 I put the widget on the home screen and it turns into the Google App widget. Then it turns into my…
Para
  • 2,022
  • 5
  • 34
  • 73
11
votes
3 answers

Android widget not updating - has incorrect widget ID

I've been working on a widget and making some advances (I hope) but still can't get it to do what I want. I have a configurator activity which works ok. When it closes I call the updateAppWidget method in the WordWidget class and the widget updates…
Sandy
  • 2,572
  • 7
  • 40
  • 61
10
votes
2 answers

Widget not appearing in widget list

I've read several questions about this on stackoverflow, and none of the answers are solving my problem. I'm trying to add a home screen widget to my app, and my widget does not appear in Android's widget list. I've tried rebooting the device,…
Andrew
  • 20,756
  • 32
  • 99
  • 177
10
votes
1 answer

appwidget freezes and refuses to update anymore: ignores updateAppWidget

So I have an app widget that is refreshing nicely, loading a new bitmap into an ImageView regularly like clockwork. Then, at some point, and silently, it will stop updating any further. I can tell from the log, and from activity at a server which…
drmrbrewer
  • 11,491
  • 21
  • 85
  • 181
10
votes
3 answers

appWidget not showing in launcher widget list in lollipop devices only

I have an app for android which I already made an appwidget for it before lollipop , for some reasons the widget doesn't appear in lollipop. However, it is showing up in the pre-lollipop devices. Here is my code: AndroidManifest.xml
8
votes
3 answers

Image in Widget

I am trying to set image in image view in widget layout in onUpdate, but image is not updating @Override public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { Log.i(TAG, "onUpdate…
8
votes
2 answers

How do I update an Android AppWidget after upgrading/reinstalling the application?

I created an App (https://play.google.com/store/apps/details?id=com.widget.analytics) that displays one's Google Analytics statistics on the Android home screen using an AppWidget. Unfortunately, after upgrading the app to a new release the users…
jones
  • 668
  • 7
  • 23
7
votes
2 answers

appwidget listview rows not updating or loading after Marshmallow upgrade

I have a widget app that works with no problem Android Lollipop or lower OS. When I upgraded my nexus 5 into Marshmallow (android 6.0), I realize that my widget has a problem on loading custom row listview. Widget has a dynamic textView and a…
7
votes
2 answers

Android widget stops working after a while?

I have a flashlight app with a widget. The widget is used to turn the flashlight on and off and does not display main activity or anything. After a few hours, however, the widget does nothing. I mean if you click it, nothing happens. I have two…
Muhammad Ali
  • 3,478
  • 5
  • 19
  • 30
6
votes
2 answers

How to interact with db from widget in MVVM pattern

I have an application which fetches the data from api and caches in db. I want to be able to show this data (from db) in the widget and also add a button to update the data, which when pressed will fetch the data and update the db and hence update…
6
votes
0 answers

USER_PRESENT with AppWidgetProvider in Android Oreo 8 not received

I'm creating an Android Widget and are trying to receive the USER_PRESENT intent that I have registered in my AndroidManifest.xml. When the user unlocks their phone the widget should fetch and update itself with weather information I fetch from a…
Martin
  • 195
  • 1
  • 12
6
votes
1 answer

Widget does not works after “Clear Memory”

The problem is that after I use the built in Task Manager's Clean Memory/Ram, My widget stops working .I guess this is related to the Task Manager's method of cleaning RAM.After a lot of research and some attempts, I found that i need…
Shakeeb Ayaz
  • 6,200
  • 6
  • 45
  • 64
1
2 3
12 13