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
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
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
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
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
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
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
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
Oct 27, 2010
I want to change the behavior of back button,
I have 3 activity, activity1, activity2, and activity3
another activity, activity4 is a login activity
start ->activity1-----click---->Activity2-----click---->activity3
CODE:......................
Now my question is that, when i click on apps, i want to start activity4. I'm not able to do this, always start of application is opening the activity2 in this case (back button).
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
Apr 7, 2010
I wrote a home screen widget with one image on it. When the image is clicked, browser will be opened for a url link.
Generally, it is working. But a weird thing is that, when I click background, then click the picture, the browser will not be open. Until I click the second time on the picture, the browser opens. The steps to reproduce is below:
Click on the home screen widget background.
Click on the image on the home screen. The browser is not opened.
Click on the image again. The browser is opened.
If I didn't click on the background, the image will react to click very well, i.e. browser will be open when the image is clicked the first time.
The widget XML file is as below:
CODE:..................
View 1 Replies
View Related
Mar 8, 2010
I just discovered this issue - it may be only relevant to 2.1 since I upgraded (or to something else entirely) but when my Eris is plugged in and I use it the Home Screen seems to act crazy - well not that crazy - just that with motion the Homes Screens roll "left( that is to the left most screen) almost like I am using the track ball (but only in one direction) - unplug it and it works fine - its not a major issue but a wierd one - anyone else notice this behavior.
View 11 Replies
View Related
Mar 2, 2010
I'd like to use the volume buttons for something else in my Android application. The Dolphin browser does this I am told.
View 1 Replies
View Related
Mar 30, 2010
Whenever I am using any app and press the home button, the home screen blacks out for a few secs and it takes around 10 sec to get all the icons back and before I can start using my phone again. I am using a non rooted mytouch 3g.
This problem does not happen if I exit an app by pressing the back button. It becomes very annoying at times.
View 7 Replies
View Related
Nov 1, 2009
Ive had open home downloaded for over a month and i only used it for a short period of time before switching back to the default homepage setting. Now, because of the new features added to Open Home i want to switch back, and every time i open 'Open Home' it only opens until i hit the home key. Then it does not ask me what i want to use as my default as it used to. I went to settings>applications>manage applications>open home to clear all defaults but it is not highlighted for me to select it. How can i set Open Home to my default again?
View 10 Replies
View Related
Dec 19, 2009
When I DL'd the GDE app, I accidentally set my stock droid "HOME" screen as the default screen when the popup box came up asking me to choose between stock Home and GDE. Now when I click on GDE and click the home button, it switches back to the stock Home screen. How to I switch the settings now to set the GDE app as the new home screen?
View 15 Replies
View Related
May 19, 2010
I have been working on a replacement for the stock Car Home app for a bit, and I am completely stumped on how to override the Home button so that my app will be brought back to the foreground whenever the phone is docked. This is the way that Car Home works, so there must be a way. It seems that BroadcastReceivers won't work, because the intent that is broadcast whenever the Home button is pressed will still cause the default homescreen app to launch; I cannot prevent it. I can override the Home button from within my app, but that does me no good since this needs to work when the user is outside my app. Car Home also does not do anything weird like set itself as the default homescreen app while it's running (I checked the logcat to make sure).
I've been really beating my head against the wall on this. Does anyone have any ideas, or can you at least point me in the right direction?
View 3 Replies
View Related
Mar 29, 2010
I just installed lock 2.0 and i was just adjusting the settings and now every time I'm in my phone and i touch the "Home" button it locks my phone instead of taking me back to my home screen! Is this normal? Did I accidental do it in the settings? HELP its driving me crazy
I'm on the new 2.1 leak if that matters
View 7 Replies
View Related
Jul 4, 2010
This has been brought up before, but I was unable to find a satisfying answer. And I know it's a newbish question.
What is the difference between exiting an app with the back button compared to the home button? I am not talking about switching to the home screen, I am talking about a scenario when you want to exit an app. For example, you play a game, you're done - do you press home or back? Or, you're in the Facebook app and you want to exit to the homescreen - what do you press - back or home? At first, I thought both buttons do the same with the difference that home brings you to the homescreen instantly while back goes through your previous steps/pages/screens in the current app and then returns you the homescreen.
But later I noticed that 'reactivating' some apps that were exited via the back button cause them to 'reload' (the loading screen shows up - with certain games, grooveshark's loading screen, etc.) while they switch back instantly when "exited" with the home button.
I gather the way to 'leave' an app you don't plan on using for at least a short while (I am not talking about closing the app, I know it's up to Android, or some task-killer) is the back button, while home is more for task switching/starting new apps while old ones are running.
View 8 Replies
View Related
Jun 9, 2009
My application is composed by several activities,I would like to give the user the option to go back to the home screen of my application by pressing a button on the screen.At the same time I can't call the finish() function on activities between the home screen and the currently visible activity because by pressing the back button the user will go back only one step and see the previous activity.Any idea on how to achieve this?Is it possible to access the activity stack and e.g. close all the activities it contains except the first one?
View 5 Replies
View Related
Aug 5, 2010
I have a wizard application that I want to make Home application. How can I convert regular application into a home application.
View 1 Replies
View Related
Sep 3, 2010
If I want to write a Screensaver or Lockscreen. Is there a way to prevent the home key from going back to the launcher?
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
Jan 5, 2010
I remember reading about an app that when you hang up a phone call it send you back to the home screen. anybody know the name?
View 2 Replies
View Related
Jun 25, 2010
I am writing a count down timer, using .postdelayed(), that speaks each second as the timer goes down to zero. I have trouble understanding the consequences of the user hitting the back or home button.
The countdown continues when hitting either button. When home is pressed and you reclick the app, it goes back to the same count(this is what i always want) and continues to count down. When you hit the back key and then reclick the app, you get a new clock that has not started but I still here the sounds from the original timer. How can I code an app so it only can have one instance and chicking the app icon will always go to the active version if it is running?
View 1 Replies
View Related
Sep 12, 2010
When I press back or home in my application, it hides, but the MediaPlayer keeps going. Is there a way to know when these buttons have been pressed and stop playback before closing?
View 2 Replies
View Related