Android :: ADB Shell Exiting Abnormally

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.

Android :: ADB shell exiting abnormally


Android :: Warning Before Exiting Application?

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

Android :: Getting Crash When Exiting Activity?

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

Android :: Process Died After Exiting Application

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

Android :: Execute Code Before Exiting Application?

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

Android :: Service Won't Stop When Exiting Application

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

Android :: Exiting From Xml.parse When Match Found

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

Android :: Stay Running In Background Exiting Applications

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

Android :: Different Behavior When Exiting Application Using BACK And HOME?

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

Android :: Cannot Stop Soundpool Loop Even After Exiting Application

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

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 View Related

Android :: Application Restarts When Exiting With Back Button

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

Android :: Any Way To Kill Threads Those Are In Sleep Mode / While Exiting Application

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

Exiting Main Thread

Feb 7, 2014

I am trying to connect to a database, and I understand that it has to be outside of the main thread but i thought that this is what my code was doing...apparently not because i keep getting the error: android.os.NetworkOnMainThreadException.

package com.example.dbtesting;
import java.sql.*;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
[code]....

View 1 Replies View Related

HTC Desire :: Sound Coming Out After Exiting Game

May 9, 2010

I have midnight bowling installed, and when I play it works, but when I stop (press home button) I get the game sound after a while, so it is still running in the background. There is no exit button in this game, so how do I stop it then? cause it's eating my battery alive :-)

View 3 Replies View Related

Samsung Moment :: Exiting Download Mode

May 13, 2010

After wasting over an hour trying to update to 2.1, I've given up on trying to get the drivers to work, but now my phone is stuck in Download Mode. Is there a way to get out of this, and turn my phone back on, so I can use it for now, before taking it to the Sprint store tomorrow to have them do the update?

View 2 Replies View Related

Sprint HTC Hero :: Reboot When Exiting Browser?

Jul 4, 2010

I've notice recently my Hero has been acting up, almost as if it is rebooting. However, I don't believe it is a full reboo, i.e. no sprint logo during boot. Only occurs when exiting out from the internet browser. As soon as you hit the home screen to exit, the phone returns to the white htc load page. It appears like it is the full reboot but it does not move next to the Sprint/Now pages. Next the desktop appears but it is grayed out (i.e. my desktop still shows but grayed out, no icons or widgets showen) and the spinning loading icon shows up. Once it finishes loading things appear back to normal. Almost makes me wonder if this reboot is more like sense rebooting and not the entire phone/system. Not sure if this is possible but I want to get anyone's thoughts and if anyone else had expirenced this.

View 12 Replies View Related

General :: After Exiting Any App Home Screen Does Not Turn Black

Jan 16, 2013

Anytime i am done using my phone it stays on unless i black it out by hitting the power button. shouldn't it do this automatically? If i get a text in the middle of the night it stays lit up killing my battery, how do i stop this?

View 1 Replies View Related

HTC Incredible :: Applications Exiting Back To Home Screen Automatically?

May 3, 2010

For example when I was using the camera and as soon as a snap a pic it goes back to the home screen, not all the time, but annoying nonetheless. It just did that when I was using google maps also.

View 1 Replies View Related

General :: Browser Keeps Exiting - Goes Back To Phone Home Screen

Jul 3, 2013

Browser keeps exiting, but I've only noticed it when I visit a certain page. Nothing comes up as in a force closing it just goes back to my phones home screen. I've tried clearing cache and that didn't work. Its really annoying, & I don't want to have to download another browser thats a last resort for me.

View 1 Replies View Related

Android :: How To Save Activity's State When Exiting - Android?

Feb 22, 2010

I have a basic app with text inputs, a spinner input, and a second spinner input whose array depends on a setting changed in the Options menu. Currently, when I press Home or press Return while in my app, I either return to the desktop or cycle back through old inputs i put in recently. How can I prevent my app from opening multiple instances of itself so that there is only one instance running at any given time, and then how can I save the data entered into inputs, and the settings chosen in my option menu? I'm a bit new to Java, so I apologize if this is a simple problem.

View 1 Replies View Related

Android :: How To Use Shell Command In App

Aug 28, 2009

I want to use command like "ls","mkdir","cd","./"..etc, in the app, somebody says use Runtime class,

Runtime.getRuntime().exec("ls");

but there is nothing happen.. I also use logcat to observe, but have the same result.

so could app use (linux) command?

View 6 Replies View Related

Android :: Tab Completion In Adb Shell

Feb 17, 2010

The only thing I found is to cross compile bash. Is there another way to have tab completion in the Android shell?

View 2 Replies View Related

Android :: How To Traceroute In Adb Shell

Oct 19, 2010

I have a rooted device, I type "su" in adb shell, then I try to traceroute. It says "traceroute: not found". I can't find traceroute in any bin folders.

View 1 Replies View Related

Android :: How To Send An SMS From A Shell

Oct 28, 2010

I would like to be able to send an actual SMS message from a shell using just the command line and not relying on any apk to do so. I am interested in sending this message between phones, not from the emulator to the phone. For example, by running the command: service call phone 2 s16 "1234567890"

I can place a call from phone to phone using the command line. The 'service list' command shows an isms service, which I can't seem to provide the correct arguments for. I would assume that one of the args should be a PDU string but haven't had any luck so far.

View 2 Replies View Related

Android :: Want To Know About Commands Available In Phone Shell?

Sep 5, 2010

Can't find information on how to print out documentation on android shell commands while in the shell. Something along the lines of.

View 4 Replies View Related

Android :: Possible To Run ADB Shell Command From Inside An App

Jan 29, 2009

I am trying to run an ADB shell command from inside an android app using the JAVA's Runtime.getRunTime.exec API. I am getting an error "ERROR/ProcessManager(1041): Error running adb: Permission denied". Wanted to check if there is any permission that I need to request to get it working or that running the adb shell command would not be allowed from with in the Android app.

I am able to execute other linux commands like 'ls' from the android app though.

View 5 Replies View Related

Android :: Run A Shell Command From Within Code

Jun 16, 2010

I am trying to execute a command from within my code, the command is "echo 125 > /sys/devices/platform/flashlight.0/leds/flashlight/brightness" and I can run it without problems from adb shell

I am using Runtime class to execute it : Runtime.getRuntime().exec("echo 125 > /sys/devices/platform/flashlight.0/leds/flashlight/brightness");

However I get a permissions error since I am not supposed to access the sys directory. I have also tried to place the command in a String[] just in case spaces caused a problem but it didn't make much differense.

View 5 Replies View Related

Android :: Possible To Run ADB Shell Hello.c Command From Inside An App

Nov 13, 2009

I have copied a file named hello(compiled form hello.c) in android data folder and using command like "adb shell datahello" in android machine terminal. and it give fine output.

Actual Question is that is there is any way that in button click listener, i initiate the same command like "adb shell datahello" (or any other appropriate way to execute adb shell commands) and gets its output in TextView.

View 2 Replies View Related

Android :: Can Update.zip Be Installed Through ADB Shell

Nov 16, 2010

Can an Update.zip be installed through ADB Shell?

View 3 Replies View Related







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