Questions tagged [android-appwidget]

Android App Widgets are custom views that can be placed on the home screen of an Android device.

Android App Widgets are custom views that can be placed on the homescreen of an Android device.

Useful links

992 questions
7
votes
1 answer

Check if a widget is exists on homescreen using appWidgetId

I am using AlarmManager to update my widgets. And I want to stop it if there is no widget on homescreen. But I am facing a problem with detecting if there is no widget on home screen. As whenever I try to get the AppWidgetIds using this…
user2412629
7
votes
3 answers

android appwidget listview not updating

I've written an AppWidget that displays some data in a ListView from a ContentProvider, but I have trouble having it update. When I first create the widget it gets populated correctly, but after the AlarmManager's PendingIntent arrives, no updates…
buntwoi
  • 75
  • 1
  • 6
7
votes
1 answer

How to correctly set a big widget icon in android

This is my question: My program have 2 widgets. One of them is 4x1 cells size. This widget has an icon(has the same width as widget itself) set in manifest file android:icon="@drawable/widget_4bg" My problem is that on android OS 4.x mobiles in the…
Alex
  • 239
  • 5
  • 12
6
votes
4 answers

Duplicate items in GridView widget

UPDATE: I opened an issue, please star it if you are experiencing the same problem. http://code.google.com/p/android/issues/detail?id=28016 I have an appwidget with a gridview on it. When I start adding items to my widget, almost always I get the…
Ran
  • 4,117
  • 4
  • 44
  • 70
6
votes
1 answer

ViewFlipper in app widgets

I'm playing around building a new widget and was looking at the Android app widget documentation, in particular the section on which widget classes were supported. I noticed that ViewFlipper is supported, but I'm struggling to find any examples on…
Chris Knight
  • 24,333
  • 24
  • 88
  • 134
6
votes
4 answers

Passing an array of integers from an AppWidget to a preexisting RemoteViewsService to be rendered by the RemoteViewsFactory

I have an AppWidget that has a StackView contained within it. Along with the AppWidget, I have a service that is started when a user adds my AppWidget to their homescreen that polls for new data every two hours. When the service finds new data, I…
6
votes
1 answer

E/GlanceAppWidget: Error in Glance App Widget IllegalStateException: CompositionLocal LocalConfiguration not present

I am developing an app widget with compose. I have a problem with getting string from resources. If I give text as a string like text = "Label", it is working properly. But if I give with stringResource, text is not shown, and I see this problem. Is…
6
votes
2 answers

Reconfigure Widget After It Has Been Added

How do I reopen the configuration activity for a widget after it has been added to the homescreen? The following code from a Google search does not work because the widget id in the extra does not carry through to the activity: String…
akupun
  • 61
  • 1
6
votes
0 answers

Update widget on Android O

My app does not receive ACTION_SCREEN_ON or ACTION_USER_PRESENT on Android O device after device remains idle for some time. My app has widgets. I update those widgets with data from backend when the user unlocks the phone. This functionality has…
6
votes
1 answer

How to find view id in appwidgetprovider?

I have a appwidget extends from appwidgetprovider. I have created a layout xml file named main_layout.xml and add a button. If i develop a listActivity i reach this button with this path: R.layout.main_layout.button01.…
AdemC
  • 125
  • 3
  • 6
6
votes
2 answers

Why doesn't my app widget update in API 3 or 4?

I'm working on an android widget and it works great in API Level 5 or greater. It's not supported at all in API Level 1 or 2. It should work absolutely fine in 3 and 4 but for some reason the widget doesn't update. The onUpdate method gets called…
D. Patrick
  • 2,894
  • 26
  • 37
6
votes
1 answer

Load image with Glide for AppWidget

I'm working on my first app widget. Everthing is fine except one thing. I can't find out, how can I load image into ImageView at RemoteViewsFactroy's getViewAt() method with Glide. I allways get error, because I've to run into(AppWidgetTarget) at…
user3057944
  • 701
  • 1
  • 8
  • 19
6
votes
3 answers

Marquee TextView on App Widget

I am developing an AppWidget where I need a TextView to display text as a marquee. I have tried using the following code (as one would do in a regular Activity), but the text does not scroll.
Leo
  • 537
  • 1
  • 7
  • 16
6
votes
2 answers

Android update Widget from a button click

I have a widget that shows some informations from database. The widget is periodically updated every one hour. But i also let user to update it manually by clicking a refresh button on widget.How can i perform the click action and refresh the…
Lorensius W. L. T
  • 1,734
  • 4
  • 19
  • 31
6
votes
1 answer

App Widget: Ripple effect lost on list item when background is added to outer layout

This thing is driving me crazy. Here's how it works 1. everything is set as default ripple effect works list view item separator is visible 2. white background added to the widget layout ripple lost list view item separator also gone looks like…
user219882
  • 15,274
  • 23
  • 93
  • 138