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
1
vote
1 answer

android appwidgetprovider sqlite database not creating record

I have an appwidgetprovider which updates my sqlite database when the icons are "clicked" by the user. This is triggered by the onRecieve method and has worked fine but it now appears it will only work when records have been created by the activity…
TimCS
  • 363
  • 1
  • 7
  • 17
1
vote
0 answers

onDisabled and onDeleted method not being called

For some reason, the onDisabled and onDeleted method of my widget is not getting called when i remove the widget from the homescreen. I don't know why. Here's the code: public class WidgetProvider2x1 extends AppWidgetProvider { @Override public…
Amit Jayant
  • 2,501
  • 2
  • 29
  • 38
1
vote
2 answers

Appwidget can't update because of Failed Binder transaction

When I first add the widget on the screen, it works with no error, and then when I clicked the button on the widget to go into the activity and close it. The widget stops updating and shows this error 12-19 19:14:52.370: E/JavaBinder(14805): !!!…
vonc
  • 65
  • 3
  • 8
1
vote
1 answer

Android Widget Service Class to bind Collection not being Called By Provider

Please bear with me because I am new to Android development. I am building a widget that opens up a Configuration Activity upon placement on the home screen. When I am finished configuration and have pressed "done", the widget provider (onUpdate)…
1
vote
1 answer

Why is there a hidden appWidget on home screen?

After removing my last appWidget instance from home screen, onDisabled, onEnabled not working. I register my widget as a broadcast receiver, there is no instance on home screen but broadcast receives and also I see my logs that written in my…
Behnam
  • 2,212
  • 2
  • 22
  • 32
1
vote
0 answers

(Android) AlarmManager calling service in the wrong time - multiple alarms

Well, I have an AppWidget (with a AppWidgetProvider, of course), a configure Settings (where the user select the update rate between 5 minutes and 2 hours) and a Service, where the widget is updated. What is happening is that if there is only one…
1
vote
1 answer

Android widget, how to use notifyAppWidgetViewDataChanged in Android API <11

I want to update my widget in order to became compatible for Android 2.3.3 (API 10). I have some problem in my code. The following methods are not recognize with minsdkversion = 10. How can i replace them in my APPwidgetProvider class, in order to…
1
vote
1 answer

Dynamic layout in android Widget

Is it possible to create an dynamic layout in a AppWidgetProvider ? i only found tutorials to create widgets using XML, but it isn't possible to create views that way.. I want to draw images in row like this: https://i.stack.imgur.com/rgtil.jpg And…
Jason Costa
  • 73
  • 2
  • 12
1
vote
1 answer

What will happen if I leave "updatePeriodMillis" field blank in Widget Info XML file?

I don't want to update my widget periodically. If I just leave this field blank, will it create any problems or update it after some default time period ? Thanks!
Shubham
  • 780
  • 3
  • 13
  • 32
1
vote
1 answer

Android appwidget turns other widget into the widget added & second widget wont work?

I am making an android app that has 2 widgets. I have 1 widget set up and working, and the second widget is recognized in the widget list & loads correctly, but: If I already have widget 1 on the screen when I add widget 2, both widgets change to…
Liam W
  • 1,193
  • 1
  • 26
  • 46
1
vote
1 answer

AppWidgetProvider and ContentProvider

I am modifying WeatherListWidget sample Android app. In my case, data points can change on their own - and I would like these changes to be reflected in app widget display without having to click the refresh button. Is there a tutorial that would…
westsider
  • 4,967
  • 5
  • 36
  • 51
1
vote
1 answer

app widget android

I created an app widget demo, I want to know is: it possible to set it to top or bottom of the home screen? When set to bottom, then Android app menu dialer shortcut and contacts cannot be clicked. If screen is empty then it is set to top, but…
kalpana c
  • 2,739
  • 3
  • 27
  • 47
0
votes
0 answers

How fix color canvas on android widget with night mode

When i'm set my color #FF222222 in my view in widget, android device with nightmode, change my color to #FFDDDDDD I'd tried to set color in values-night, set to AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)
0
votes
0 answers

app widget is not being updated after first automatic onUpdate is called

I experienced some change in the behaviour of my widget: Previously the widget was updating automatically (every 30min) and after some certain widget action has happened (after a new entry had been added to some database). Also after some automatic…
aronyi
  • 73
  • 8
0
votes
0 answers

Pass AppWidgetManager and Intent to WorkManager

I have a widget for my android app and the setup of the widget can take several seconds. As noted in the docs you can use a WorkManager to start a task in the onUpdate() method. I also want that the onReceive() task is in a WorkManager. The Problem…