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
0
votes
0 answers

My App widget's Remoteview's receiver getting call randomly

I am beginner in working with app widget. Here i have made one app widget of app and in its class set receiver on click of widget icon.Its working when user clicks on it.But the issue is receiver also gets called sometimes automatically. I am not…
0
votes
1 answer

In Appwidget RemoteViews' setOnClickPendingIntent is not getting called after user force stops application

Here i have made one widget and added its click listener where i'm starting one service.It works perfectly.But once user force stops application from appinfo my widget's click is not responding.I m not getting why this is happening.Help on this will…
0
votes
1 answer

AppWidgetProvider - Is onUpdate triggered every time a change has been made to any of the AppWidget files?

I am wondering about the onUpdate method. I know that it is called the first time a widget is placed on the homescree, and then period in the time I defined in the appwidget info xml file. But it seems as if this method is also called whenver I make…
0
votes
0 answers

App Widget Configuration Activity - How can I access my widget Views?

I created a widget configuration file which is started when my app widget is placed on the screen. However, I don't know how I can access the button from my widget layout to make changes on it (In this example I want to change the color/tint) public…
0
votes
1 answer

Are there any problems that could occur with "looping" postDelayed() like this?

Note: This is all in updateAppWidget() of my AppWidgetProvider. I'm trying to have my widget blink back and forth between 2 colors forever. This is done by having the delayed runnables post another delayed runnable to the handler, which itself posts…
Kawaii
  • 13
  • 5
0
votes
1 answer

AppWidgetProvider - Tracking User Location in a Widget

I am just starting to understand how the Android widget lifecycle works and it seems that it is pretty much event-driven (broadcast driven). There is no real persistent session; your widget is woken up during the update and you are expected to…
Guven
  • 2,280
  • 2
  • 20
  • 34
0
votes
1 answer

My sharedpreference doesn't update,

I've been trying to get this working for a while now with no success.I'm running out of options and hope you guys can help. I want to save the text in the edit text using sharedprefernce. Then send that text to my appwidgetprovider,which sends the…
0
votes
1 answer

What is appWidgetIds[] for WidgetProvider? Why always get it's value 0?

my simple code: int[] appWidgetIds= AppWidgetManager.getInstance(getApplication()).getAppWidgetIds(new ComponentName(getApplication(), MyWidgetProvider.class)); …
user6264840
0
votes
1 answer

RemoteViewsService Wont run

I cant seem to understand why neither my onUpdate nor onRecieve from my AppWidgetProvider class starts my remoteviewservice. Both onUpdate and onRecieve does run. And both the reciever and the service are declared in the manifest. This is my…
0
votes
2 answers

Android Opening 2 different activity from home widget by clicking different button

In my simple example app i have 2 activity: MainActivity.java NewAppWidgetConfigureActivity.java Also in my app i have class NewAppWidget.java who extends AppWidgetProvider What i want to accomplish is this: When i add home widget to screen, i…
0
votes
0 answers

open other app on button click from android appwidgetprovider

I would like to open another installed app by button/imageButton click from my app widget provider. Here is my code, @Override public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { final int count =…
Rifan
  • 424
  • 6
  • 17
0
votes
0 answers

Get the list of all the widgets present in the device

I am trying to get the list of provider info for all the widgets, presented in the device from my application. The code snippet is given below: AppWidgetManager manager = AppWidgetManager.getInstance(context); List infoList =…
J.D
  • 11
  • 2
0
votes
0 answers

Not able to Click the ListView Items in Widget

I am having a homescreen widget for my app, but Not able to click any items in the list.When I click any item nothing happens. Any Help is Highly Appreciated. WidgetProvider.class import android.appwidget.AppWidgetManager; import…
0
votes
1 answer

AppWidgetProvider takes resources from wrong package (Lollipop only)

I have an app widget that shows an image. Uri uri = Uri.parse("android.resource://" + packageName + "/" + resId); rv = new RemoteViews(defaultPackageName, widgetLayout); rv.setImageViewUri(R.id.image, uri); Images are stored in different packages…
0
votes
1 answer

Android application widget has strange view glitch while updating

I developing small application widget and have some problem with updating of remote views. When widget updating through system call all is ok, but when I trying update widget from my service through this code: AppWidgetManager widgetManager =…
Beyka
  • 1,372
  • 1
  • 10
  • 15