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

Android AppWidgetProvider class not changing TextView

So I want to display the number of steps but this isn't working. The widget loads but the TextView does not change! public class WidgetDisplay extends AppWidgetProvider { public void onUpdate(Context context, AppWidgetManager appWidgetManager,…
Chris Stryker
  • 1,058
  • 2
  • 10
  • 18
0
votes
1 answer

How to declare a receiver for a widget to handle your own broadcast along with system broadcast

Suppose I want to define a receiver for my own widget and I want it to handle my own broadcast org.test.mywidget.MY_ACTION along with the APPWIDGET_xxx system broadcasts, what is the correct way to define it, if I want it to handle my own broadcast…
0
votes
2 answers

Getting settings from configure activity

I need help with following situation. I have widget with configure activity. In the activity is spinner with some values, which should affect widget look (only text in one TextView). At this time, I set AlarmManager to widget update (service) and…
skywall
  • 3,956
  • 1
  • 34
  • 52
0
votes
1 answer

Do I need to call updateAppWidget method of AppWidgetManager from the main/UI thread?

I've read the developers' guide about App Widgets and I've understood that to avoid ANR errors you should start a service within the onUpdate method of your AppWidgetProvider to update the widgets... I have a question about such a service: when we…
0
votes
1 answer

How and where store persistent objects (like db adapters) in AppWidgetProvider?

I'm developing home screen widget, and I'm using android sqlite database. I implemented a simple class DBAdapter with simple methods (add, remove, get records...) to handle database work. It works, but now I'm thinking about the best way how to do…
qkx
  • 2,383
  • 5
  • 28
  • 50
0
votes
1 answer

Android intent takes a long time to be received

In my app I am sending an intent to update an appWidget. The problem is, from the logcat I can see that the intent is taking on average ten seconds to be received. 05-16 18:12:54.070: DEBUG/PHCA_Variable(7580): Broadcast sent 05-16…
MrGibbage
  • 2,644
  • 5
  • 39
  • 50
-1
votes
1 answer

Start another activity without click on any event from AppWidgetProvider

There are many options for launch an activity without click on any events in Activity.But i didn't find any solution for launch an activity automatically without click any event on AppWidgetProvider ? Please suggest me a solution
-1
votes
1 answer

android unable to start receiver java.lang.NullPointerException

i created appwidget and i try to show json's items'(image's and text) in my appwidget(stackview widget) i successfully created app widget and i also can show json in widget but when i should click in widget i have error NullPointerException this is…
-1
votes
1 answer

How to register broadcastreceiver inside the BroadcastReceiver AppWidgetProvider class?

I have this application an AppWidget wherein when the user clicks it, it will send an SMS. Sending SMS with the click of the widget works fine. Now, I want to know if the sending of the SMS is successful or failed. How will I do that? Here is the…
-2
votes
1 answer

AppWidgetTarget doesn't work inside RemoteViewsFactory. How to get around this?

There is not enough documentation or blogs around this topic. Can someone point me in the right direction? Tried this in getView. Works on an imageview that is not part of item of listview. val articleImage: AppWidgetTarget = object…
-2
votes
1 answer

android - how to call running service class's method on click of widget?

I am new with AppWidgetProvider and service class in android.Here i'm trying to do 2 things: 1 - get click listner of widget in which i want to call isservicerunning() method which is defined below. 2-in isservicerunning() method if returns…
1 2 3
12
13