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
2
votes
1 answer

updating app widget showing different layouts

In my app users can login using different accounts and I want to show different data based on that but there is also a state that user hasn't logged in to any account. so I want to show two different layouts. first one containing the account data…
2
votes
0 answers

Getting null pointer when using Xamarin.Forms.Application.Current.Properties with Android AppWidgetProvider

I am writing an Android widget using AppWidgetProvider. To store some values (f.e. downloaded JSON data) I am using Xamarin.Forms.Application.Current.Properties. Unfortunately I am getting a null pointer exception (app crashes) after a while (I…
2
votes
1 answer

How to get the AppWidget id that I just clicked?

I need to get the id of the AppWidget when I click on it because I need the value to correctly perform certain action have some way to do it in a scalable way? but getting the id of the appwidget that I clicked is already a big help I use a code to…
João Vitor
  • 241
  • 5
  • 11
2
votes
1 answer

Create widget with known AppWidgetProviderInfo

Instead of showing the user a list of widget provider, I let him select one and then configure the widget, I manually load all widget providers and let the user drag and drop those widgets in my app. As soon as the user drops such an icon, I want to…
prom85
  • 16,896
  • 17
  • 122
  • 242
2
votes
0 answers

Animate the widget app Imageview in which i want to do rotate animation of the image view

I want to develop an widget application in which i want to do some rotate animation of the image view i am confused with with widget provider class i am trying but i am unable to do it if any body don please solve my problem. I am posting my code…
2
votes
1 answer

Changing android:updatePeriodMillis programmatically

OK, so I have done some research and the consensus seems to be that you can't update android:updatePeriodMillis programatically. It seems that you have to use AlarmManager instead, which seems like using a sledghammer to crack a nut... odd that the…
drmrbrewer
  • 11,491
  • 21
  • 85
  • 181
2
votes
2 answers

How to get the appwidget layout associated with a appwidget ID

I want to get the appwidget layout associated with an appwidget id. In the Widget provider class for an appwidget, the android docs provide an easy way to get the appwidget ids... public void onUpdate(Context context, AppWidgetManager…
user3467994
2
votes
2 answers

ListView not showing data in App Widget

I'm trying to implement a simple collection widget for my application, i'm trying to show a ListView inside a widget but the ListView is stuck at Loading... and never finish loading, and i have data in the database and the listview is still stuck…
2
votes
1 answer

How to get widgetID and ComponentName of my application in service

I am updating the widget from service(srvice and widget class are in two different package) like this AppWidgetManager widgetManager = AppWidgetManager.getInstance(this); ComponentName widgetComponent = new…
2
votes
1 answer

android widget id only for current widget

Can I get my current widgetId inside onUpdate() method of AppWidgetProvider? I found many posts about sending appWidgetId in field of Intent, but I can't understand where I have to get it before sending. I didn't find the methods for getting only…
Dmitry Ermichev
  • 397
  • 4
  • 12
2
votes
2 answers

AppWidget does not finish updating when adding it for the first time

Edit: I installed my app 4.x devices and there is no problem. Problem exists only with 3.x devices. I am trying to update an AppWidget manually when a user setting changes on the device. To do so I use code similar to this: ComponentName…
erkangur
  • 2,048
  • 5
  • 21
  • 31
2
votes
2 answers

AppWidget setFillInIntent can't handle data set in setData or componentName?

I want to launch different applications from my app widget. The widget is a list of items and clicking an item should open an app like Google Plus. When pressing an item in the list nothing happens. When I remove setData and setComponentName it pops…
2
votes
2 answers

Android widget not responding to touches

I'm trying just some very simple code to get an Android widget going but with no luck. I've looked around everywhere and haven't found a good answer. All I want (for now) is to increment a counter when the widget is touched and display the current…
Sandy
  • 2,572
  • 7
  • 40
  • 61
1
vote
0 answers

AppWidgetProvider Listen for System Setting Changes

I have a widget that user can see the current status of an accessibility service and by clicking it, the accessibly service setting opens. class MyAppWidgetProvider : AppWidgetProvider() { override fun onUpdate( context: Context?, …
Arrowsome
  • 2,649
  • 3
  • 10
  • 35
1
vote
1 answer

Providing click method to widgets

I tried to create a widget and I succeeded, but how can I meet the click needs of the tools in the widget? What I'm talking about is not redirecting onto an activity, I'm looking for a method where I can create a function. The layout file used for…
Kirion
  • 49
  • 11