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

Update AppWidget from an Activity

I'm trying to update my AppWidget from my activity. Similar to this question: Programmatically update widget from activity/service/receiver I'm using AppWidgetManager to get the ids and send an update broadcast but it doesn't work for me. I suspect…
Ran
  • 4,117
  • 4
  • 44
  • 70
0
votes
1 answer

Remote textview not changed by widget configuration activity android

I am making a widget for notepad and I am able to grab the title of notes from the database but now the only problem is I want to change the layout of the widget i.e the text in the layout.I have a listview in my configuration activity and when I…
hitman_93
  • 116
  • 9
0
votes
1 answer

AppWidget custom extras

There are intent extra codes AppWidgetManager.EXTRA_CUSTOM_EXTRAS and AppWidgetManager.EXTRA_CUSTOM_INFO. What are they for? The docs state that it's "An intent extra to pass to the AppWidget picker", but who and when does the passing? If I…
Seva Alekseyev
  • 59,826
  • 25
  • 160
  • 281
0
votes
2 answers

Android app widget issue on android 2.x device But works smoothly on android 4.x device?

I am trying display app widget( with configuration activity. where user can choose the category what to display on app widget). I can smoothly run the application with app widget in android 4.x device. everything works fine but when it comes to…
Krishna Shrestha
  • 1,662
  • 14
  • 38
0
votes
1 answer

NullPointerException under onReceive's setTextViewText

I am getting a NullPointerException (sometimes) and my appwidget crashes. It happens with any remote view's setTextViewText. I have checked the values I want to set and it is definitely not null. Here's the code snippet : public void…
Annonymous
  • 83
  • 1
  • 8
0
votes
1 answer

Rotated images in remoteviews

I'm making a battery widget, and to avoid having 20 separate PNG files for the different levels I've got one PNG which I rotate to 20 positions. On Android 3.x+ this is easy, as the ImageView element as a rotate property. For backwards compatibility…
Nick
  • 6,900
  • 5
  • 45
  • 66
0
votes
1 answer

Why is AppWidgetProvider.onUpdate called for all widget instances when new one is added?

I noticed that whenever I add new instances of the same AppWidget to the home screen, the appropriate AppWidgetProvider's onUpdate method is being called with the ids of all the instances in appWidgetIds. The reference clearly…
Xyand
  • 4,470
  • 4
  • 36
  • 63
0
votes
1 answer

Receive time tick intent in widgets, why the code below is possible?

I want to receive time tick in a widget, and tried the code in this link, and it works great on my kindle fire which runs a custom ROM of Android API level 15, but sometimes the time is wrong on my phone which runs Android 4.2 API level 17. my…
molikto
  • 536
  • 3
  • 15
0
votes
1 answer

Android: Custom font for XML in AppWidgetProvider

I am trying to use a custom font for my app, and have the XML layout use this custom font. I followed the instructions listed here, but the problem is that I get the following crash: W/AppWidgetHostView( 519): updateAppWidget couldn't find any…
user1777907
  • 1,355
  • 4
  • 12
  • 28
0
votes
1 answer

Passing date/string value from configure class to widgetprovider

I'm trying to pass a string value from a widget configuration class to appWidgetProvider class. I've read that you pass a string between classes like this: In current activity, create an intent Intent i = new Intent(getApplicationContext(),…
Jakob Harteg
  • 9,587
  • 15
  • 56
  • 78
0
votes
1 answer

Detecting that my app widget's data is not up-to-date

I'm writing an Android app widget that updates every minute with the current data. To update it, I'm using an AlarmManager that only works while the phone is not asleep: AlarmManager alarmManager = (AlarmManager)…
Ilya Kogan
  • 21,995
  • 15
  • 85
  • 141
0
votes
1 answer

Android Widget Text Update after 2mins

I have a widget created for my app to launch. The data in the widget is getting updated after 30mins. I need to reduce the timing to around 2mins. I have heard that it can be done using AlarmService but I have no idea about how it should be…
Lavanya
  • 3,903
  • 6
  • 31
  • 57
0
votes
1 answer

RemoteView appwidget trouble

I am in the process of trying to make a remote view contained with in a widget. The idea seems sound all in all but I'm having a bit of difficulty in the code here is what I am having an issue with: RemoteViews RemV = new…
CodeMonkeyAlx
  • 813
  • 4
  • 16
  • 32
0
votes
1 answer

Sending an Intent onUpdate when only the time elapsed

I'm still in my first steps of learning to program for Android in Java. So I my question might be obvious to some more experienced programmers, but I couldn't really find anything usefull or a specifick example. Anyway, I have a widget. And I want…
Bigalow
  • 325
  • 2
  • 14
0
votes
2 answers

AppWidget crashes in onDisabled

I'm making widget, that will be updated by Intent.ACTION_TIME_TICK. So I registered reciever (my AppWidgetProvider): private IntentFilter intentFilter = new IntentFilter(Intent.ACTION_TIME_TICK); @Override public void onEnabled(Context…
Holoceo
  • 168
  • 2
  • 7