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

Detect OnTouch on AppWidget. If is it possible?

Detect OnTouch on AppWidget. If is it possible? Hello! I'm trying to create my first AppWidget for Android 2.1 in which a client may have a chance to select an item on my custom view. I'm going to create a custom view and a slider for it and client…
Alex Zezekalo
  • 1,031
  • 2
  • 17
  • 34
5
votes
1 answer

Android : instumentation testing for app widgets

I am looking to automate testing for home-screen widgets. I have looked at android testing page, and the InstrumentationTestRunner class. I have also looked at CTS source code; but I have not been able to find anything useful. The closest I could…
Chaitanya
  • 2,039
  • 4
  • 25
  • 32
4
votes
3 answers

AppWidget ID's lifetime

I have an application with some AppWidgets. I'm storing some information about every widget including its appWidgetId inside a database - I need this information to properly update every widget. The problem is that after the device is rebooted I…
Egor
  • 39,695
  • 10
  • 113
  • 130
4
votes
2 answers

Changing AppWidget's background dynamically with a 9 patch drawable

There is no setBackground() method in the RemoteViews class, so I've used the following workaround: Created a FrameLayout for my app widget with an ImageView as the background view. Changed the ImageView image using setImageViewResource()…
Egor
  • 39,695
  • 10
  • 113
  • 130
4
votes
0 answers

Creating an android appwidget ListView for SDK 8?

I've developed a small android application which scrapes data from webpage. I've written a custom Adapter (using BaseAdapter) to display the data in a ListView (android.R.layout.simple_list_item_2). Now I thought it would be nice to have an app…
Sebastian Stumpf
  • 2,761
  • 1
  • 26
  • 34
4
votes
1 answer

Android AppWidgetProvider onReceive not called on button click

I have a widget running under android and I would like for it to update itself when the user clicks a button on the widget. For some reason, the onReceive method is never called when a button is clicked after i install the widget. I have a onUpdate…
Marty
  • 2,965
  • 4
  • 30
  • 45
4
votes
0 answers

How to add application widget in home screen of launcher application?

I have created a simple launcher application and also an application widget. This app widget works perfect in home screen of default launcher (Press and hold on home screen --> Widgets ---> MyExampleWidget). I want to implement the same behavior in…
4
votes
3 answers

What ids are in onUpdate's appWidgetIds[]?

Do the ids in the array appWidgetIds of the method public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { all belong to my app? If so then there are some appwidgets somewhere in the nirvana of my android,…
Tobias
  • 7,282
  • 6
  • 63
  • 85
4
votes
2 answers

How can I create a backward compatible Android paging app widget?

I'm having trouble trying to find any tutorials on how to make a paging app widget like the ones found in Facebook, Twitter and FriendCaster. I could use the new Android 3.0+ tools with an adapter, however that would be difficult to test as I don't…
Joe Simpson
  • 2,546
  • 4
  • 30
  • 46
4
votes
0 answers

Are AppWidgets possible on AndroidTV?

We know that in Android Phones we do have "App-Widgets" which remain in the home screen. I have tried to run the same mobile app on an Android TV. App works fine but if I do a long tap on the app from list of apps I am not able to see anything…
Rohan Pande
  • 301
  • 1
  • 5
4
votes
0 answers

How to customize the Home Screen Widget in Android Automotive App

How I can customize the Home Screen widget in Android Automotive OS. I have tested apps on polestar and volvo, but I didn't find any solution to update or customize the home screen widget. Widget Findings: Tested with API and classes provided by…
4
votes
2 answers

Is it safe to use Coroutines runBlocking() inside onDataSetChanged of RemoteViewsFactory?

I am trying to fetch some latest movie images and display them in the Android app widgets, As per the requirement, the widget should refresh every hour to get the latest movies images. Since I am using coroutines throughout the app, I need to use…
4
votes
1 answer

How to Reset the ColorFilter of a RemoteView in an AppWidget

I am setting a ColorFilter on one of my ImageViews with the following code: - views.setInt(myView, "setColorFilter", myColour); Is there any way to remove this filter to return the colours to normal? I have tried using:…
Ash McConnell
  • 1,340
  • 1
  • 17
  • 28
4
votes
3 answers

Get other applications icon uri?

I have an Android appwidget which shows icons of other applications on it. I get the other applications icons with appInfo.loadIcon and then I set it to the widgets with setImageViewBitmap. The problem is that if I have too many icons on the widget,…
Ran
  • 4,117
  • 4
  • 44
  • 70
4
votes
2 answers

Today extension is not working in iOS 14 beta

I tried running my app on iOS 14 beta which is just released. And surprisingly I don't see today extension in the phone anymore which was working all good till iOS 13+. Will today extensions not work anymore on iOS 14 since App Widgets are…
Pavan kumar C
  • 393
  • 1
  • 4
  • 15