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

how to add appwidget to homescreen by clicking on button in activity

I create a button in Activty and by clicking on button I want to add Appwidget to Homescreen Programatically in android. actually I am using appwidgethost class to add appwidget to homescreen but appwidget is added to activity not to homescreen. my…
Shashank Gupta
  • 165
  • 2
  • 16
0
votes
2 answers

Android app widget not updating after changing system clock

I have an Android widget scheduled to update every hour android:updatePeriodMillis="3600000" However even when I change the system clock (forward one hour or more) the widget update method is not being called, no visual changes or logs happen. I…
htafoya
  • 18,261
  • 11
  • 80
  • 104
0
votes
1 answer

Widget not working well in Android 5.1 but perfect in 4.1, 4.4 etc

I developed a widget some years ago. The widget works perfectly until now. It is not working fine in Android 5.1.1 devices, but it works perfect in Android 4.4 and lower versions. The widget displays three numeric values given by the operating…
0
votes
0 answers

ViewStub not working in App widget

Below is the view stub that I am trying to use in the widget layout for app…
amj
  • 367
  • 1
  • 8
  • 26
0
votes
2 answers

How to start new activity in each item list on App Widget

I have an App Widget that contains a ListView layout. When I click on item list the activity is open, but if I press Home Button and click on other item list the activity in background is open again. I want that each item list opens a new Activity…
nss
  • 121
  • 2
  • 11
0
votes
1 answer

Can an appwidget onClick PendingIntent be set from any class? if so, How

I have an appwidget and i want to set an onClick Pending Intent. I would like this PendingIntent to be set from the UpdateService class, not the WidgetProvider class. I've unsuccessfully tried to do it in the same way as i would from the…
user3467994
0
votes
1 answer

Dynamic Broadcast receiver for Android widget

The Android widget documentation (http://developer.android.com/guide/topics/appwidgets/index.html#AppWidgetProvider) seems to indicate that you can set your own broadcast receiver to handle widget activity instead of using the AppWidgetProvider…
0
votes
0 answers

Change drawable from widget

Cant change the android:background from my widget_main.xml I have tryed remoteviews.setInt(R.id.boton, "setBackgroundResource", R.drawable.toggle_on); and remoteviews.setImageViewResource(R.id.boton, R.drawable.toggle_on); with no results. Here…
Santi Barbat
  • 2,097
  • 2
  • 21
  • 26
0
votes
1 answer

Determine if headphones are plugged in through AppWidgetProvider, pause music when unplugged

There are a million and five questions on SO about this, but I've tried sorting through them all, and can not get it working. I know that AppWidgetProvider just extends BroadcastReceiver so I think I can just do everything within my…
0
votes
0 answers

Allowing icon to change from user input

I am allowing the user to change the icon in the class Personalize by sending a request code holding an image from a user gallery. The setIconImageinWidget() method sends the result here (in Drag_and_Drop_App): else if(requestCode ==…
0
votes
1 answer

Adding setData to Intent makes widget update on Android

I have two widgets and one configuration activity for them. And I had problem with updating widgets. One of AppWidgetProvider classes looked like: public class HolidaysWidgetProvider extends AppWidgetProvider { @Override public void…
0
votes
1 answer

Android: Create colored TextClock widget

I have been trying to make an Android widget that is simply a TextClock with a user-defined color. However, after a restart of the launcher, the color of the TextClock always reverts to white and does not retain the user-defined color. This is my…
Eric Cochran
  • 8,414
  • 5
  • 50
  • 91
0
votes
1 answer

appwidget not updating itself

I am working on android appwidget , There are issues updating appwidget periodically . Changed updating period to more than 30 minutes . Still not updating the widget public class MyWidgetProvider extends AppWidgetProvider { final static String…
user2660060
  • 151
  • 1
  • 8
0
votes
1 answer

OnUpdate called before onReceive in Android Widget

I wanted to make a widget which has two to buttons to change the text and the image inside the widget my problem is I can't send the desired position from the service to the AppWidgetProvider class calls onUpdate before onRecieve so that I can't get…
mnagy
  • 1,085
  • 1
  • 17
  • 36
0
votes
1 answer

Whats the relation between ContentProvider and AppWidgetProvider

I am trying to learn list widget with the WeatherListWidget example by Google. Every other place I looked to find info on widget, they used AppWidgetProvider, but in this example they use ContentProvider. I checked to see maybe one inherets the…