Android :: Application Manager Not Exiting Properly In Eclair 2.1
Feb 9, 2010
With Android Eclair 2.1 on ARM-based target, we are executing Instrumentation test application from command line:
am instrument -e class android.app.foo. -w com.android.cts.foo.MyTestApp/android.test.InstrumentationTestRunner
Test application executes fine, showing result of the sub-tests in the MyTestApp. But, Application Manager is not exiting properly. This is observed from "ps" command output:
1114 0 52328 S app_process /system/bin com.android.commands.am.Am in....
Due to this issue, we are not able to execute the test applications in shell script.
View 3 Replies
Jun 11, 2010
I have been giving ROM Manager from the market a go this afternoon and I am very impressed. I can swap between Eclair and Froyo within a minute, sweet.
View 2 Replies
View Related
Jul 29, 2009
I have an app that receives and stores SMS messages. The main use is to run in the background, although it does have a full GUI when running in the foreground. I'm using a notification with the FLAG_ONGOING_EVENT flag so users can tell the application is running, even if it's in the background. However, the user could easily close the app by viewing the main screen and clicking the back button. The notification icon goes away, but I would like to be able to warn the user that closing the app would prevent it from capturing the SMS messages. Is there any way to prompt the user if they really want to exit the application when they hit the back button, and prevent the exit if they say no? Or should I take a different approach? And a bonus question: is there a way of receiving an SMS message, but prevent it from passing on to, say, the Messenging app?
View 5 Replies
View Related
Jan 14, 2010
I am seeing a curious behaviour in my app. I have a widget that gets updated by a service every # hours, when the service finishes I stop it, using "stopService(new Intent(this, MyService.class));", the widget if pressed launches an Activity. Now it gets interesting, while im on the activity everyting works fine, then when I exit the app(by the back key or a button I designed which simply calls this.finish() ) the ActivityManager would tell me that my process has died, I do not see any error of any kind, just that the process has died.
Why I am seeing that message and what does it mean exactly? That is having a side effect on my service regarding static variables getting set to default. Could my code be the cause of this? Is there any way to know that your process has died? I have tested my app on a HTC Hero running 1.5, it always works well on the emulator and I never get that message. I know android kills processes to reclaim memory but Im always careful to close apps heavy on resources.
View 4 Replies
View Related
Nov 18, 2009
I would like to know how to execute code before exiting application. My application is composed of several activities. When the user starts the application (from the launcher menu or from a notification in the status bar), he goes in an InitActivity where I process some initializations. From user experience, application always restarts. One of these initializations is to init a network manager and start a thread that periodically sends a network request to notify a server that application is active.
I need to process some end operations, like stopping this thread when user quits application, for example by pressing the HOME key or BACK key when he's in the root activity. However, when the user press the HOME key, application is still running in background.
Q1 : is it possible to execute code when exiting application (I see the onTerminate() method of the class Application but it seems not to be always called)?
Q2 : Is it possible to force application exit (activity method finish () only destroy the current activity, not the application)?
Q3 : Is it possible to handle HOME key press (onKeyDown() is not called when this button is pushed)?
View 3 Replies
View Related
Jul 13, 2009
I have a service receiving and sending data to a server in separate threads each. The service lifecycle methods look like this:..................
View 3 Replies
View Related
Mar 5, 2009
Say a user runs my app from the HOME screen. The app has 3 tabs. Say he/she selectes a different tab, so he/she is in a different screen (same task). Now - if the user presses BACK - the device returns to the HOME screen. If the user launches my app again - the default tab is shown. BUT - if the user presses HOME - the device returns to the HOME screen (same). If the user launches my app again - the OTHER tab is shown.
I understand (sort of) the logic - BACK returns to previous app, popping my app from the history stack, so when launched again - it is started from scratch. But this is confusing my customers - they say it's a bug ! They dont understand the different between two keys doing the same thing as far as they see (returning to HOME). Moreover - I see a different behavior with the built-in DIALER app - I change tabs, press HOME, launch the app again - and it starts with the default tab.
View 11 Replies
View Related
Nov 4, 2010
I have a timer thread setup to play a loop using soundpool, but for some reason I cannot get _soundPool.stop(_playbackTimer); to stop the loop. even if I exit the application the loop keeps running. I have to physically power off the phone to get it to stop. am I missing something here? Does anyone have any experience with this? I have searched with no resolution. below is a snippet.
if(timeLeft>0 && timeLeft<20 && ticking == false){ _soundPool.play(_playbackTimer, 0.3f, 0.3f, 0, -1, 1); ticking=true; }
if(timeLeft==0 || timeLeft>20){ _soundPool.stop(_playbackTimer); ticking=false; }
View 2 Replies
View Related
Dec 30, 2009
Does anybody have any insight as to why a game appliction would restart when exiting with the back button. It does not automatically restart when using the Home button to exit and this only occurs one time (after the second attempt to exit with the back button, it exits cleanly). Also, I can reproduce this consistently on the Motorola Droid, but have not been able to reproduce on the G1 or the emulator running 2.0. I've tried changing the launchMode of my activities, but have not found something that works. These are my activities:
1. Splash Screen, Single Instance, Main/Launcher 2. Help, Single Instance 3. High Score, Single Top 4. Preferences, Single Top 5. Options, Single Top 6. Game, Single Top, with SurfaceView
The steps to reproduce the problem are: 1. User starts application, launching Splash Screen Activity 2. User starts game, launching Game Activity 3. Game Activity launches Options Activity (for result) 4. Game Activity restarts with result and game begins. 5. Pressing Back Button returns to Splash Screen Activity 6. Pressing Back Button again, briefly shows home screen, then relaunches Game Activity which starts Options Acitivity 7. Pressing Back Button again finally shows the home screen
View 2 Replies
View Related
Feb 18, 2009
the thread sleeped not killed and it wakes up after 10 sec and try to post message and it causes exception. is there any way to kill the threads those are in sleep mode while exiting the application?
View 5 Replies
View Related
Jan 5, 2010
I will try to modify native Camera package in Eclipse. So, I make Camera project in Eclipse and try to compile it. But, "Platform Eclair is a preview and requires application manifests to set minSdkVersion to 'Eclair'" error message is shown. Does it mean minSdkVersion information should be inclused in Camera manifests.xml file as "Eclair"? If there are anyone know this, please share your valuable information.
View 2 Replies
View Related
Aug 17, 2010
I want my application to always run in the background untill being exited properly. Currently I notice after a while my application closes on it own.
View 14 Replies
View Related
Aug 31, 2010
I don't get this Gmail app. It doesn't seem to sync properly with my Gmail account. First off, sometimes the main screen will show "Inbox (1)" or whatever number to indicate I have email, but there are no emails when I tap "Inbox" (but there *are* emails on the website, so they are really in my inbox). This may also be related to the label syncing options. I have them all set to "sync all" because I assume this means it will keep everything synced no matter how old it is, and if you specify a number of days, then it just syncs as far back as that many days. But this seems to cause a problem too, in that sometimes I have email on the website, but the phone isn't detecting it.
Finally, both times I've tried to send an email, it won't work. The email ends up as "sending" in the Outbox, but never gets sent. And yes there is a data connection. I see no reason why it shouldn't send immediately. I didn't expect the Gmail app, of all things, to be so problematic on an Android phone!
View 17 Replies
View Related
Apr 12, 2010
once I check a message, the app still says I have a message until I reply. Is there a way to fix that? I do have handcent but I still prefer the htc message app.
View 4 Replies
View Related
Oct 1, 2009
The ApplicationManager is killing the process of my application when the user presses on "FORCE STOP" on the Aplication Manager.According to the documentation a broadcast action is.The user has restarted a package, and all of its processes have been killed. All runtime state associated with it (processes, alarms, notifications, etc) should be removed. *Note that the restarted package does not receive this broadcast.* The data contains the name of the package.How can I listen that action in my application; I have tried creating a BroadcastReceiver on my package, but the onReceive() is not called.
View 14 Replies
View Related
May 4, 2009
I want to access Download manager in my application, and set
CODE:............
However, I still get
CODE:...........
Is there anything else I should do to access Download Manager?
View 3 Replies
View Related
Apr 18, 2010
Is anyone having an issue with yahoo messenger on the HTC hero? It worked well at first - but now it doesn't. Specifically - I can log in - but none of my contacts pop up. In addition, I can send IM's from my phone - but I can't receive them.
View 3 Replies
View Related
Jul 3, 2010
I was wondering, is there anyway a developer can hide or exclude a certain app permissions from being seen by Android market users? And are the permissions for an app controlled or regulated by Google? Another question I have - Is there anyway to restrict PDF files from opening in the default browser? This is a problem when I am on a search engine and accidentally click a link that's a pdf file- I don't want pdf's downloaded without asking me permission atleast. And my last question, is there a way to view current extensions that are installed in the browser.? Where is androids inbuilt file manager? Does uninstalling an application completely take off everything related to that app from your phone?
View 2 Replies
View Related
Sep 17, 2009
I am currently working on porting a application written in C in android platform. I need to know that can i invoke/call the getSystemService from the C application using invocation interface by JNI. Meaning using a .java file which will interact with the interace provided by the android.telephony.TelephonyManager.java for using getCallState() and other mehthods.
View 2 Replies
View Related
May 15, 2010
I have two BroadcastReceiver registered. When the app is closed they both fire at the appropriate times and do the appropriate things. If the app is closed then killed (say with an AppKiller), the receivers never receive their broadcasts, and nothing happens. Presumably the same thing happens if the parent app is killed due to low memory, so how do I ensure those broadcasts are fired/received. The API states that even if the app is killed it should fire, does anyone else have experience with this situation? If it helps my manifest is:
<!-- receivers for AlarmManager -->
<receiver android:exported="true" android:label="Shift roster updating calendar."
android:name="com.skooter.shiftroster.backend.service.UpdateCalendar" >
</receiver> <receiver android:exported="true" android:label="Shift roster checking alarm."
android:name="com.skooter.shiftroster.backend.service.SetWakeup" >
</receiver>
and nothing esoteric is going on in the AlarmManager/BroadcastReceivers
View 1 Replies
View Related
Nov 15, 2010
I have a class which extends AsyncTask, which is intended to serve as a generic task manager class for my application. The strange behavior is that the progress dialog shows up, but is never dismissed. I am sure that onPostExecute() gets called for every task instance, as any Log.d("","") statements fire if placed in here, even the Toast messages show up from within this method, but I am not able to dismiss the static dialog. I understand that AsyncTask(s) have access to UI thread at only 2 places [onPreExecute() and onPostExecute()], so I think trying to dismiss the dialog in runOnUiThread() is unnecessary. All calls to executeTask() are made from different onCreate() methods of different activities that need to fetch some data over network before populating some of their UI elements, and I always pass the current activity's context to the tasks. As I do not switch activities until after the related tasks are completed, I believe the activity context objects are still valid (am I wrong to have assumed this???) I have never found any of them to be null while debugging.
Could this be a timing issue? I have also observed that most of the times DDMS shows all tasks get completed before the activity is displayed. If I use new Handler().postDelayed(runnable_which_calls_these_tasks,10); in the onCreate(), and add delaying code in foo_X(), the activities are displayed without any delay, but the dialog will just not dismiss(). I have read through quite a number of articles on this issue but am still not able to figure out exactly where am I going wrong. I do not want to define each task as private inner class Task1 extends AsyncTask<> in all of my activity classes and I would not want to (unless this is the only solution) load my application object with all activity references either as mentioned in this discussion: Is AsyncTask really massively flawed or am I just missing something?. I have spent a week on this and am absolutely clueless :( It would be great if someone can guide me, and let me know what am I missing. Following is the class definition: [I've removed some irrelevant application specific code for clarity]
public class NetworkTask extends AsyncTask<Void, Integer, Boolean> {
private Context UIcontext;
private int operationType;
private static ProgressDialog dialog;
private static int taskCount;
private NetworkTask(int operationType Context context){ this.UIcontext = context;
this.operationType = operationType;
if (taskCount++ == 0) dialog = ProgressDialog.show(context,"","Loading...");
}
public static Boolean executeTask(int operationType, Context context) { return new NetworkTask(operationType, context).execute().get();
} @Override protected void onPreExecute(){ super.onPreExecute();
if (taskCount == 1) dialog.show();
} @Override protected Boolean doInBackground(Void... arg0) { switch(operationType){ case TYPE_1: foo1();
break; case TYPE_2: foo2(); break;
case TYPE_3 foo3(); break; case TYPE_4: foo4(); break;
} @Override protected void onPostExecute(Boolean result) { super.onPostExecute(result);
taskCount--;
if (dialog.isShowing() && taskCount == 0){ dialog.dismiss();
}else { Toast.makeText(UIcontext, "Task#"+ operationType+", m done, but there are "+taskCount+" more", 5).show();
} } }
View 1 Replies
View Related
Oct 13, 2009
I find that when I am running 2 android devices connected to 1 linux machine, I find I can get ADB shell to exit abnormally. If I start a shell on Device 1, then on Device 2 start a shell and type reboot. Device 2 resets like expected, but the shell on device 1 will exit. I find that functionality of running controlling multiple devices with ADB very useful for testing. My question is can anyone reproduce this? Has this been fixed upstream? Is ADB planning on first class support for multiple devices, or was this an after thought feature? Any help debugging this, or possible just a little information in the right direction so I can make a patch myself.
View 5 Replies
View Related
Sep 4, 2009
I am experiencing a crash in my app when I quit (via the back button) out of my Activity. So far as I can tell this is happening in the Android codebase and not mine, but I'm not completely convinced of that.
AndroidRuntime E Uncaught handler: thread main exiting due to uncaught exception
AndroidRuntime E java.lang.RuntimeException: Unable to stop activity {MyApp/MyApp.MainActivity}: java.lang.NullPointerException
AndroidRuntime E at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3097)
AndroidRuntime E at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3159)
AndroidRuntime E at android.app.ActivityThread.access$2400(ActivityThread.java:112)
AndroidRuntime E at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1724)
AndroidRuntime E at android.os.Handler.dispatchMessage(Handler.java:99)
AndroidRuntime E at android.os.Looper.loop(Looper.java:123)
AndroidRuntime E at android.app.ActivityThread.main(ActivityThread.java:3948)
AndroidRuntime E at java.lang.reflect.Method.invokeNative(Native Method)
AndroidRuntime E at java.lang.reflect.Method.invoke(Method.java:521)
AndroidRuntime E at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
AndroidRuntime E at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
AndroidRuntime E at dalvik.system.NativeStart.main(Native Method)
AndroidRuntime E Caused by: java.lang.NullPointerException
AndroidRuntime E at android.app.Activity.performStop(Activity.java:3575)
AndroidRuntime E at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3092)
AndroidRuntime E ... 11 more
View 1 Replies
View Related
Jun 12, 2010
I am totally new to the android thing and the evo is my first ever droid based phone. I installed something called advanced task manager from the marketplace however I am finding several threads on how its not a good thing for the phone. I have no idea if its good or bad, but I do know that what shows up in the task manager list of running apps is way different than what shows up in the phones running task list - menu/settings/applications/running services. What shows up in task manager is a bunch of stuff that running services don't show. So whats the scoop? To have or not to have?
View 6 Replies
View Related
Apr 6, 2012
I have a problem with apkmanager. When I decompile then compile and sign an apk (like now Settings.apk) all works fine but when I put the file in the phone it doesn't work.
And it does not install, it says: "Application not installed". Why this?
View 2 Replies
View Related
Aug 18, 2010
I'm using the Android SAX parser to search for entries in a rather large (6MB) XML file. I'm basically using a derivative of the code shown in listing 8 here. The question I have is how do I stop parsing once my match has been found? The code shown continues parsing through the end of the file but I want to stop before then. Is this possible or do I need to use something other than SAX
View 1 Replies
View Related
Jul 16, 2010
I created a new project from an example provided in the SDK,The application builds and runs successfully but doesn't show what it should be showing. This is what it is showing:screenshot of improperly shown UI
View 3 Replies
View Related
Jun 20, 2010
I've been researching the OS a bit and I can't really tell what happens to programs when you hit the home button to leave them. Do they stay running in the background? After a little bit of time does the system close them out? What happens to them? I have a Sprint Evo and I don't see a way to close them out. I know that battery life can always be helped, and I would hate to leave them running all day just sucking the life out of the phone if they don't have to be.
View 18 Replies
View Related
Jun 14, 2010
So I get the 2nd leak of froyo 2.2 the updated version via update.zip method. I then learn about Rom manager app, And get both the free and paid versions. I go to download/install the downloaded rom's from the rom manager and every time it reboots it doesn't work. I've been trying to get BB 1.1 with smoked glass, And it'll download, But wont install?
View 25 Replies
View Related
Jan 15, 2010
When i open my application manager, it forces closes.
View 9 Replies
View Related