Android :: OnUpdate Doesn't Get Called On Device / Way To Fix?

Feb 14, 2010

I'm new to Android development, and I'm trying to write a small widget. This code works on the emulator and the text is set to "test", but when i run it on my Nexus One it doesn't. It just appear like onUpdate isn't called. Anyone have any good idea what i'm doing wrong?

Android :: OnUpdate doesn't get called on device / Way to fix?


Android :: OnMeasure Gets Called / View Doesn't Change Size

Dec 3, 2009

I have a View that I've placed into a ScrollView.The View paginates text.If the text changes, then the height of this view will also change (expand or contract, depending on whether the new text takes more vertical space or less).For debugging, I draw a rectangle around the view to show its current size. After I repaginate, I cannot get Android to cause the View to change its size -- I have tried calling measure() myself, calling requestLayout(), and calling forceLayout() -- even though my overloaded onMeasure gets called, and calls setMeasuredDimension() with the correct values, the view remains the same size as it was before repagination. What am I missing?

View 2 Replies View Related

Android :: Run Query On Background Thread On Cursoradapter Doesn't Get Called?

Jul 25, 2010

I have a listactivity as a startup screen in my application. Which is displaying database records using custom cursor adapter. On create I set the filterable flag - getListView().setTextFilterEnabled(true)

My cursoradapter overrides runQueryOnBackgroundThread which runs corresponding query. The problem is that after typing some text and hitting enter, runQueryOnBackgroundThread never gets called. However, when the item click in the same view launches another activity(detail view of the record) and I come back to the original list activity, hitting back button, then text filtering works just fine. I don't call setTextFilterEnabled anywhere except during the initialization process and I can't really find any other API affecting this behavior, so any guesses why text filtering doesn't work initially, but all of the sudden starts working when I come back to the list activity from child activity?

View 3 Replies View Related

Android :: Why Is OnCreate Called Twice When Is Device Booting

Jan 18, 2010

I make 'hello world' app :-) and wrote a Log code in onCreate. and then give "android.intent.category.DEFAULT" and "android.intent.category.HOME"

This situation appears emulator(1.5, 2.0, 2.1). but HTC hero(1.5, original htc rom) didn't! it just call one time! Which is normal? and If calling twice is normal, why are they call twice?

View 2 Replies View Related

Android : OnResume Called While Device Is Off For Hours

Mar 19, 2009

I have documented cases of an activity's onResume method getting called HOURS after the G1 is - well, not asleep, since a WakeLock is in use, but "idle" with the screen off (indeed, it had been off in one case for 6+ hours).

View 2 Replies View Related

Android :: What Happens To Thread As On Destroy Is Called When Device Is Rotated

Jun 15, 2010

I would like to know as to what will happen to the thread which has been created by an activity and the device is rotated. I have observed that the onDestroy method is called when this happens. Will the thread be killed too?If the thread is not killed, how can I reassociate the thread with the activity as a new instance of the activity is created on rotation.

View 1 Replies View Related

Android :: Manually Update AppWidgetProviders OnUpdate

Nov 4, 2009

My custom AppWidgetProvider has onUpdate method where i have logic to update RemoteViews

It is not periodically updated by system, but rather, i'd like to trigger onUpdate if something happens (in one of my app Activities). both custom AppWidgetProvider and Activities i'd like to trigger update from run with the same UID

I tried some AppWidgetManager's methods, but no luck, finally i ended with really weird solution: i'm sending broadcast with action ACTION_APPWIDGET_UPDATE and extras EXTRA_APPWIDGET_IDS which i got from AppWidgetManager

Is it a common way of updating AppWidgetProvider?

View 7 Replies View Related

Android :: Changing A Widget's Icon From OnUpdate

Dec 29, 2009

I have a widget that is meant to change its icon every time it receives the Update broadcast. However, the widget never manages to display its icon properly, displaying the text "Problem loading widget". The Logcat message is: WARN/AppWidgetHostView(612): updateAppWidget couldn't find any view, using error view
WARN/ App Widget HostView(612) : android.widget.RemoteViews$ActionException: can't find view: 0x7f060003 The code for my onUpdate is: public class ImageWidgetProvider extends AppWidgetProvider{private static final String TAG = "Steve"; public static final int[] IMAGES = { R.drawable.ic_launcher_alarmclock,/*and many more*/}; @Override public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds){for (int appWidgetId : appWidgetIds) {Log.d(TAG, "onUpdate:"); int imageNum = (new java.util.Random().nextInt(IMAGES.length)); Log.d(TAG, Integer.toString (IMAGES[imageNum])); RemoteViews remoteView = new RemoteViews(context.getPackageName(), R.layout.widget); emoteView.setImageViewResource (R.id.image_in_widget, IMAGES[ imageNum]);Now when I hover the mouse over "R.id.image_in_widget" it brings up that its value is equal to 0x7f060003 - the view that it can't find according to Logcat. Using the second Log statement, I verified that IMAGES[imageNum] does indeed refer to a random image from the IMAGES array. (In case it matters, it comes out as a decimal value rather than a hexadecimal one.) Any ideas what I'm doing wrong? Edit: Here is the layout file for the widget, where the image_in_widget ImageView is declared.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ImageView android:name="@+id/image_in_widget"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/

View 4 Replies View Related

Android :: Store State Information In AppWidgetProvider - Between OnUpdate Cycles

Aug 26, 2009

I know I can save information in a static attribute in a widget, however, is there a way for a widget instance to save the state information similar to the Activity onSaveInstanceState(Bundle outState) method? I don't want to write to a database for this state information.

View 2 Replies View Related

Android :: Vibrating Device Doesn't Work

Jun 24, 2010

I actually have an app that I test with two devices. One LG GW620, and one Samsung Spica. I would like when User touch the screen, the device vibrate. In fact, On the LG GW620, the device vibrate when I touch it. But on the spica doesn't... I looked for settings on the spica, but Vibrator is check, so I don't understand why it doesn't vibrate.

In my app I have : <uses-permission android:name="android.permission.VIBRATE"></uses-permission> and in the code :

Vibrator vibrator =(Vibrator)getSystemService(Context.VIBRATOR_SERVICE);
vibrator.vibrate(100);

But I think it is not the best thing to do that. I wish device vibrate for every click, but I don't know if I have to do a Vibrator for each OnClick ? Or if I could do only one Vibrator for all the application? And especially why it doesn't work on Spica?

View 2 Replies View Related

Android :: Phone Doesn't Allow To Test App On Real Device

Oct 29, 2010

I'm trying to test a test app I developed on android 2.2 sdk on my htc phone with Froyo on it (2.2). In the emulator it works fine, when I export as unsigned app and try to install on the phone, it doesn't allow me, just telling me 'application non installed'. The phone has the settings to accept installation of non android application, so I'm not sure why I can't test on it. Is it because it's not signed?

View 2 Replies View Related

Android : When I Add Database To Project It Doesn't Upload To Device

Jun 26, 2010

The database file is identified by Dalvik when I insert it via the Dalvik Debug Monitor Server (DDMS), but when I add the database to the project assist it doesn't even upload to the device (as I can see through the DDMS). How to fix it?

View 1 Replies View Related

Android :: DDMS Doesn't Show Process List On Device

Oct 15, 2009

I have two phones, one running 1.5 and the other on 1.6. When I connect the 1.6 device via usb, DDMS recognizes it and in the top-left pane shows: HT842....... | Online | 1.6, debug

It then lists the individual processes, I can select them and use various tools like allocation tracker.

But when I connect the 1.5 device, DDMS recognizes it but shows: HT95A....... | Online | 1.5

But it does not show any of the processes on the device, so I am not able to do use allocation tracker and such. The sysinfo tab works, and I can monitor logcat with filter and such in the bottom pane.

What am I missing here? Obviously the 1.5 device has USB debugging enabled. Why does it not show 'debug' in DDMS? I'm using SDK 1.5_r2 on linux (Ubuntu 9.04), if that makes a difference.

View 5 Replies View Related

Android :: Android 1.5 - Asynctask DoInBackground Not Called / Method Called

Oct 26, 2010

I am running into an issue with the way my asynctasks are executed. Here's the problem code:

firstTask = new background().new FirstTask(context);
if(firstTask.execute().get().toString().equals("1"))
secondTask = new background().new SecondTask(context);

What I'm doing here is creating a new asynctask object, assigning it to firstTask and then executing it. I then want to fire off a separate asynctask when the first one is done and making sure it returns a success value (1 in this case). This works perfectly on Android 2.0 and up. However, I am testing with Android 1.5 and problems start popping up. The code above will run the first asynctask but doInBackground() is never called despite onPreExecute() being called. If I am to execute the first task without the get() method, doInBackground() is called and everything works as expected. Except now I do not have a way to determine if the first task completed successfully so that I can tell the second task to execute. Is it safe to assume that this is a bug with asynctask on Android 1.5? Especially since the API says that the get method has been implemented since API 3. Is there any way to fix this? Or another way to determine that the first task has finished?

View 2 Replies View Related

HTC Desire :: HTC Sync 3 Doesn't Recognize Device

Sep 29, 2010

So, this is what I did - fiddled around with the phone a bit before finally deciding to install HTC Sync.Downloaded the latest version (3.x) from HTC's website. The software and drivers installed without a problem.The device, however, was not recognized by Sync. Try as I might.Tinkered with the settings in the handset, too - eg. prompt to choose function (I don't even get a prompt when I connect the USB!), checked debugger mode, et al.The phone continues to charge; and that's the only thing that happens.I am running Windows XP (32 bit), SP3. (While downloading the software from HTC's website, I had chosen the option 'Asia no use.I went a step further - by trying to install the older version (2.0.28). Found it on the internet.

View 7 Replies View Related

General :: Computer Doesn't Recognize Device

Aug 29, 2013

I tried to download a gaaps file and I think it was the wrong one because I ended up completely deleting my OS. The battery fell out and now I'm unable to get into recovery mode. I can get into odin mode, though.My computer doesn't recognize the device when I plug it in, either.

View 5 Replies View Related

Android :: Device Chooser Doesn't List Emulators With Older APIs Than Build Version

Nov 13, 2010

My application is built on 2.2, but it is backwards compatible down to 1.6. I've used reflection for the newer methods. When I try to run it on an emulator in Eclipse, it only lists my 2.2 AVDs. I need to test on 1.6 to ensure compatibility. I've tried building with Android 2.2 and with Google APIs 2.2 with no luck. (what's the difference, anyway?) I have set <uses-sdk android:minSdkVersion="4" targetSDK="8"/> in my manifest. I also tried targetSDK="4".

View 2 Replies View Related

Samsung Captivate :: Allshare Doesn't See Ps3 As A Playback Device / Fix It

Jul 20, 2010

I can seem to get my captivate and ps3 to communicate. Allshare doesn't see ps3 as a playback device..

View 8 Replies View Related

HTC EVO 4G : Flash Player Not Working / When Try To Update Device Doesn't Support It

Jul 24, 2010

My flash player no longer works on my phone and when I try to update it. I am told that my device doesn't support it

View 1 Replies View Related

General :: Flashed Wrong ROM Now Device Doesn't Work Anymore

Feb 17, 2013

I flashed wrong ROM with my device with odin, and my device doesn't work any more.

It looks like a real brick. It just stay in black screen. No vibration, No sound and No animation!! What can I do for my device?

View 4 Replies View Related

General :: Acer A100 - Device Doesn't Have Hardware Menu Button?

Apr 13, 2012

I've installed several apps that are supposed to have features that I can't even find. For example, I installed "Writer". This is supposed to have text formatting features (bold, italic, font size). But, after highlighting some text, I can't find anything that triggers a "Format" menu. A long tap on selected text will bring up a Cut & Paste menu. But if there's a Format menu, I haven't found it, yet.

I'm using Writer as an example, but I've tried half a dozen apps now that are listed as having certain features. Sometimes the program menu is the little checkerboard icon next to the Honeycomb task switcher at the bottom of the screen, but on many apps this menu is empty of anything useful. Some programs have an icon on the top of the screen that triggers a menu, but on others I've tapped on everything I can find and found no extra controls.

Is there some common screen gesture that I haven't discovered yet? Are developers listing future features that don't exist yet? Did Gingerbread have some context menu feature that's missing in Honeycomb? And is there some reason developers don't bother to provide a paragraph or two explaining how to use their product?

btw - I have an Acer A100 7 inch tablet, running generic Honeycomb 3.2 and downloading apps from GooglePlay. My device doesn't have a hardware Menu button, maybe that's the problem?

View 5 Replies View Related

Android :: How To Called Mp3 Download?

Jun 4, 2010

I was reading through app suggestions and someone mentioned an app called mp3 Download that basically functions like limewire, letting you search and download mp3's to your phone. Does anyone know anything about this app and whether it is good or not? Or have suggestions for a similiar app? It had mixed reviews at appbrain and when I searched here it came up with a bunch of other threads.

View 4 Replies View Related

Android :: An App Called Listen?

Sep 22, 2010

I was told by a few friends that the iphone has an app that allows you to hold your phone up to a song that you dont know and it tells you the name.Does android have anything like that?

View 6 Replies View Related

Android :: OnKeyDown Not Always Called In App

Oct 20, 2009

I've created a simple android game, based on the Lunar Lander sample, and I'm having a problem with handling key events.When the activity starts, the only keys that onKeyDown or onKeyUp get called for are the dpad up/down/left/right keys.Neither the menu, back, or dpad_center keys trigger onKey methods. However, once I've pushed one of the dpad up/down/left/right buttons, pressing the menu, back, or dpad_center keys do trigger these methods. I'm not getting any errors, or any indication of what's going wrong.It's possible that the focus is set wrong - the activity is started from a button on screen, so it could be in touchscreen mode. If that's the case, shouldn't touching the back button get me in to the right focus mode so that I can catch the event?I'm using the emulator from SDK-1.5r3.I have not been able to try this on a real phone yet.

View 4 Replies View Related

Android :: Whats That App Called?

Aug 27, 2010

I saw it on the market but forgot to install it. It displays the number of remaining minutes, texts and data left for the month if your on a monthly mobile phone plan.

View 2 Replies View Related

Android :: OnLowMemory Not Getting Called

Apr 6, 2010

I'm working on an application which allocates lot of memory and hence I'm bound to get OutOfMemory. I want a way to get notified when system is running short of memory so that I can stop processing further, notify user and release as much memory as possible.

According to official Android documentation there is a callback onLowMemory from the system. I have a class which extends android.app.Application and I have overridden onLowMemory() method. This class has entry in the in the application tag of AndroidManifest. However it never gets called in my case. Do I need to register for this event using AndroidManifest or any other means?

View 9 Replies View Related

Android :: OnContextMenuClosed() Not Called Under 2.x

Jan 1, 2010

In one of my applications I programmatically open the context menu when something is clicked in my MapActivity overlay. This works perfectly under 1.x as well as on my 2.0 Milestone. I've used showContextMenuForChild() historically, but openContextMenu() does that same thing.

As expected onCreateContextMenu() is called to build the menu and then onContextItemSelected() is called when something is selected. So far all is well.

The odd thing is that under 1.x the onContextMenuClosed() method is called when I press the back key, but not so under 2.0. This confuses states for my app since I need to know whether menu is shown or not - or maybe there is a way to know this that I have not (yet) figured out...

Is this a deliberate change or should I file it as a bug? Googling comes up pretty dry (stuff that is over a year old).

Anyone with a 2.0.1 Droid that would care to test whether this has already been fixed? (The ETA for Milestone 2.0.1 seems hazy still, but it appears that at least one of my reported bugs has been fixed in 2.0.1 event though it isn't flagged as such.)

View 4 Replies View Related

Android :: OnSurfaceCreated Called Twice

Oct 27, 2010

Is there a way to make sure onSurfaceCreated is called only once during startup.

Currently in my app it gets called once with say 800x480 then it gets called a second time with 480x800. I guess this is probably due to a call to setRequestedOrientation in onCreate. Is there any way to make sure the app starts in a particular orientation, to prevent orientation changes, and to have onSurfaceCreated get called only once during start up?

View 3 Replies View Related

Android :: When Does OnFocusChanged Get Called

Mar 3, 2009

I have over-loaded the onFocusChanged() in my classes which inherits from LinearLayout.

CODE:...........................

View 4 Replies View Related

Android :: UncaughtExceptionHandler Not Called?

Apr 16, 2010

i use a ScheduledThreadPoolExecutor combined with a ThreadFactory, their all combined should cause an unchaught Exception to be logged so that i can see what happening if any thread is dying in the ThreadPool:

threadPool = new ScheduledThreadPoolExecutor(poolSize, new ThreadFactory());

My ThreadFactory, also sets a UncaughtExceptionHandler :

public Thread newThread(final Runnable r) { final Thread thread = new Thread(r); thread.setUncaughtExceptionHandler(new ThreadLogger()); final int counter = count.getAndIncrement(); final String name = threadName + counter; thread.setName(threadName + counter); if (Logging.isLoggingEnabled()) { Log.d(LOG_TAG, "Thread created :" + name); } return thread; }

The ThreadLogger :................

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved