Android :: AppWidget Is Not Updating
Jan 3, 2010
I am attempting to query a database and update information in the appwidget screen based on changes to the database done while in an activity so that when the user exits, the changes are reflected in the widget on the screen.The appwidget is being updated with a broadcast from OnPause() and OnStop() in my primary Activity.Relevant pieces of the code are below.The Toast shows me that the data is correctly being pulled when OnUpdate() is called.But the widget refused to change
View 2 Replies
Feb 15, 2010
I would need a fast updating (minimum 5 frames/second) appwidget which can be on the desktop all the time (like the cpu usage or other things mostly measurement gauges).The appwidget is not a "must" but I've found it easy to configure for any customer so the management is easy and I need those gauges to be shown like an appwidget on the desktop.The only problem is the update speed - I've seen that appwidget is not really thought for my needs. In my case it's not about phones, the small unit will always have power supply so draining the battery is not an issue. I could tweak the 30 minute update time but it doesn't helps too much - the appwidget framework is simply too slow with all that serialization and would eat too much CPU. What other solutions can be used? I've seen that a system service (LoadAverageService for example) would do the job but that one is not really configurable, has to be compiled into Android so I kinda don't like it. The same is valid with custom app screens or any other solution which needs an custom Android build. So this is a last solution if nothing else works.
A good solution could be if the Appwidget framework would accept other views than the enlisted ones (AnalogClock, Button, Imageview, etc.) and the update would be done internally in the widget, not through the appwidget serialization chanels.
View 7 Replies
View Related
Nov 7, 2010
I'm trying to create an appwidget with a customizable background. I use a NinePatchDrawable and I would like to change it's color (using the setColorFilter method). This is no problem in an Activity, but it does dot seem possible with the RemoteView object used for appwidgets.Is there some way to get an ImageView in an appwidget to be updated with a new Drawable, not a Bitmap?Or if not, perhaps it's possible to get the actual size of the appwidget and convert / save the colored NinePatchDrawable to a Bitmap and then update the ImageView with that?I already searched quite a bit for a solution, but haven't found anything so far. I hope it's not impossible.
View 2 Replies
View Related
Jul 31, 2010
I am trying to debug a problem where my widget becomes invalid and a new one fills in.This only happens once at the beginning of time and then it remains the second widget forever.So, I want to put code in to narrow down the point in time when it happens.Then I would get a list of all the enabled IDs and see if I am in the list. I cannot find a method, member, attribute, etc. that would give me my id?
View 1 Replies
View Related
Aug 9, 2009
I have a problem, I want a appwidget with a listview, but it seems that appwidget does not support this elment.so is there any way to reslove it?
View 2 Replies
View Related
Apr 25, 2009
Just wonder what limitations there are for UI elements in AppWidgets? I tried a ListView and was met with an error. I saw the other post that EditText isn't available.Just wondering if there was a full list somewhere?
View 8 Replies
View Related
Dec 31, 2009
I have a strange problem, on a few devices. I have developed an AppWidget, and it uses a database to store the configuration for each instance of the widget. The widget id is the key in the database.Everything works on most devices, but I got a bug report a couple of days ago. A user said that the widget never worked after reboot. The user who was very helpful sent me a log from his phone, and I could then see that the widget got a new id each time he did a reboot.
View 2 Replies
View Related
Jan 10, 2010
Can anyone tell me what views can I use in an appWidget?
View 2 Replies
View Related
Jul 31, 2010
LinearLayout just works fine in an AppWidget. However, when I change the layout's xml to a TableLayout, I am unable to get the widget working :(.
Can anyone point me to a sample? [could not find anything on the web]
View 1 Replies
View Related
Nov 9, 2009
Is it possible to launch an app widget from another application.
For example, I have a button in an application. When I click on that button, an appwidget must be launched.
View 7 Replies
View Related
Sep 7, 2010
I am trying to update an AppWidget manually when a user setting changes on the device.I can tell that my AppWidget onUpdate method is being called as a result since I log some debug strings to logcat in the code. However the AppWidget itself doesn't change on the screen.Here comes the interesting part: if I rotate my device and force a refresh of the home screen (from PORTRAIT to LANDSCAPE or vice-versa) then finally my AppWidget gets updated. However rotating the device does not trigger the onUpdate method to be called, so the AppWidget must be using the RemoteViews provided in the earlier update. Can somebody explain me what to do to force the home screen redraw of my AppWidget when it processes an update?
View 2 Replies
View Related
Nov 4, 2009
I wrote a widget that has been working fine for most folks. However, I started getting bug reports about how the widget would be blank on reboot (not receive an update?), and it seemed that the Sprint Hero continually came up. I thought I was crazy but I'm finding that other people are having the same problems:Searching Google for "sprint hero appwidget problems" yields:"Added warning about the problem on the Sprint Hero device: On the Sprint Hero (HTC ROM v1.29.xxx) the AppWidget API is broken in such a way that it won't."I e-mailed the author in hopes of getting an answer, but I haven't received any response. Does anybody with a Sprint Hero know what the problem is?
View 8 Replies
View Related
Jun 24, 2009
Using Appwidgets, If we use TextView in layout provider xml then, we are able to set the text in Provider.java using remoteViews.setTextViewText() method.
Similarly, if I use AnalogClock as AppWidget in xml then, is there any method available to change the android:dial value using RemoteViews or AnalogClock api's in Provider.java ?
For Ex- I need to load two dial png's based on AM or PM.
View 4 Replies
View Related
Aug 22, 2010
I'm developing a Android AppWidget for my application. For updating my appwidget I need to download data from network. But when I try to do that in onUpdate method, my appWidget is killed by Android system. I learnt that time consuming operations can't be done in receivers so I launched a service from onUpdate method and launched a thread from that. But still the problem persists.
Can anyone please let me know how to do network operations in Appwidget?
View 1 Replies
View Related
Apr 15, 2009
I've been looking at the new 1.5_pre SDK today, and the new AppWidget API in particular. I was hoping to write a widget for posting to Twitter as part of my nanoTweeter app. The interface I had in mind would look very similar to the Google Search widget, with an EditText and a submit Button, but as far as I can see there's no way to get at user input in a RemoteViews. Is that right, or am I overlooking something?
View 6 Replies
View Related
Apr 30, 2010
I seem to be having trouble reading preferences from my AppWidgetProvider class. My code works in an Activity, but it does not in an AppWidgetProvider. Here is the code I am using to read back a boolean:
SharedPreferences settings = getSharedPreferences(PREFS_NAME, 0);
boolean autoreplyon = settings.getBoolean("autoreplyon", false);
However, I get the "The method getSharedPreferences(String, int) is undefined for the type widget" error (widget is the name of my AppWidgetProvider class).
View 1 Replies
View Related
May 3, 2010
Is it possible to receive SMS message on appWidget?
I saw android sample source(API Demos).
In API Demos, ExampleAppWidgetProvider class extends AppWidgetProvider, not Activity.
So, I guess it is impossible to regist SMS Receiver like this code...
My goal is to receive SMS message on my custom appWidget.
View 1 Replies
View Related
May 29, 2009
The documentation hints that: "...the lock screen could also contain widgets, and it would have a different way of adding, removing and otherwise managing widgets." [1]
Now that I have 1.5, I can see the lock screen changed to show the same background as the home screen. Is there a way to put AppWidgets on the lock screen in 1.5?
[1] http://developer.android.com/reference/android/appwidget/package-desc...
View 3 Replies
View Related
Apr 12, 2010
is it possible to play a video in an appwidget?
View 2 Replies
View Related
Aug 9, 2009
I want to create an appwidget with a listview, but it seems that remotview do not support thsi element(there is some error) so is there any way to resolve it or some other view to replace listview.
View 2 Replies
View Related
Sep 9, 2010
How can i put appwidget on my view and let it updated itself??now,i can put the remoteviews on my activity,but it seems not update itself, how can i make it update itself?
View 1 Replies
View Related
Jul 24, 2010
Anyone having trouble with widgets stop updating? Like my clock/calendar/weather/news/pretty much any widget i have stops updating after an hour. So i look at my clock widget two hours later and it is an hour behind. Happens to ALL my widgets.Even the quick turn on/off wifi,bt,gps and such. They just stop updating/showing animation.I have ADW launcher installed. I am wondering if it is that. I do not really want to remove it as i hate the stock 3 button interface at the bottom (why do i need a contacts and phone, just use the phone to look thru contacts, wasted space IMO) and am quite keen on keeping the 5 button.Any ideas? If i power off the phone and turn it back on it's fine again for about an hour. SOmetimes randomly thru the day it will start updating and working fine again then randomly stop again.
View 12 Replies
View Related
Apr 15, 2009
I'm playing around with the new AppWidget API, I get the impression from the docs that I don't need an android:configuration attribute in my AppWidgetProviderInfo xml resource. Curiously though, when I try to add my AppWidget to the home screen, I just get a black textview that reads "Problem loading widget".
View 2 Replies
View Related
Nov 26, 2009
I am working on a Widget which will get the Current GPS location and pass this value to remote PHP page to get the Information and display it in the Widget. This is what I am trying to do.I am facing problem while implementing Location Listener for appWidget. It is not updating with the Current Location and It is showing the initial widget i.e "Loading Widget"(Here I put this text)
View 2 Replies
View Related
Apr 30, 2010
I have an AppWidget which provides a summary of some data stored and controlled by my main Application. (In a similar way to a Calendar AppWidget showing the next event from the main Calendar application). I want to know the best practice for retrieving the data to update my widget. I have followed the example, and I have extended AppWidgetProvider and have a working widget, onto which I can update. I would expect to read the data from my main application and then update it via my AppWidgetProvider's onUpdate() routine.
Now, is the best practice here for my separate main application to provide the data via a ContentProvider? I assume so, as my Appwidget is not part of the same application. Is it possible to access a ContentProvider inside my onUpdate() routine? Before writing my main application content provider I started to test out retrieving some available data like Contacts information, and showing say a contact name in my widget, to show I can extract data from an existing ContentProvider. When accessing the Contacts contentprovider, the examples talk about:
1) Activity.managedQuery(), but my AppWidget is not an activity. 2) ContentResolver.query(), but I can't work out how to get a valid ContentResolver so I can access the Contacts. getContentResolver() does not appear to be defined for AppWidgetProviders. Am I approaching this the correct way?
View 3 Replies
View Related
Dec 29, 2009
I am developing a photo frame widget, all works except on an orientation change to landscape mode my appwidget doesn't display correctly as I have it set to portrait dimensions and it is too large for the display. I would like to run some code to resize the image so that everything displays correctly and it uses all the space that I allot. What is the correct way to do this? I can think of 2 methods however both seem inefficient. The first would be to register a broadcast reciever to take orientation changes, however I don't want to redo my appwidget everytime the phone is turned on its side as the majority of the time the homescreen is not showing when the orientation is changed (ie other apps are used, and I don't need my code running in the background). I only need it to run when the home screen is shown. The second would be to setup a service to manage my appwidget but that also seems inefficient to be always running in the background.
View 10 Replies
View Related
Jul 29, 2010
I'm writing an app-widget that displays some numbers, each with label in front of it.
The layout looks like this:
.-----------------------------.
| Label1 | AAAAAAAAAAA |
| LongerLabelLabel2 | BBBBBBB |
| LongLabel3 | CCCCCCCCCC |
'-----------------------------'
There is one outer (vertical) LinearLayout, and each row is a horizontal LinearLayout with two TextViews.
The problem is that the numbers get ellipsized if the width of the label and the number is too wide for the widget. I want the labels to get ellipsized.
The above situation for instance, would end up like this:
.-----------------------------.
| Label1 | AAAAAAAAAAA |
| LongerLabelLabel2 | BBBB... |
| LongLabel3 | CCCCCCCCCC |
'-----------------------------'
instead of the desired
.---------------------------.
| Label1 | AAAAAAAAAAA |
| LongerLabelL... | BBBBBBB |
| LongLabel3 | CCCCCCCCCC |
'---------------------------'
I can't for my life figure out how to solve this. Any help is appreciated.
My current layout is the following:
CODE:...................
View 1 Replies
View Related
Sep 3, 2010
Say that there is an App Widget that shows a configuration Activity when placed. The configuration page allows adjusting the appearance of the widget.
The user may place multiple instances of this widget on their home screen. What would be the best way to maintain the unique configuration states on each of the widget instances? Or would each widget instance have to adopt the same global state?
View 1 Replies
View Related
May 14, 2009
I am trying to add a "EditText" Field to an AppWidget. I took the AppWidget example from here: http://developer.android.com/guide/samples/ApiDemos/src/com/example/andr oid/apis/appwidget/index.html and modified it by replacing the TextView with a EditText. It doesnt work... Compiles and runs but the Widget sais "Problem loading Widget" when it shows up.
Maybe an example? Is the default Google Search Widget open source? Can someone give ma a link to the source?
View 6 Replies
View Related
Dec 8, 2009
Thanks to TasKiller I have reliable way to shutdown updates coming to my AppWidget from the AlarmManager! Now, sarcasm aside, how do I recover from such event? So far I only see that the Alerts are resurrected only after rebooting the phone. I can stick recovery code into few places such as various Activity#onCreate that belong to my app and my widget but is there a better way? Also what if the alerts are OK - is there a way to detect that and not run AlarmManager#setRepeating? Or is there a harm to run it multiple times?
View 1 Replies
View Related