Search code examples
androidmotorola-droid

On Motorola Droid X, on clicking on home button why application exists? it just has to go background


My application works fine on samsung, sony erricson and emulators.. but when i checked on droid x, the home button works weird.

Usually on clicking on the home button, current app has to run in background, but in droid it is exists and when i start the application again from menu, it starts from the beginning but not from where i left the application.

Do i have to do anything in coding? i tried handling the home button myself, but after reading the document, it says home button can not be used in applications. Is there any way to do this? please help.. Thank you..


Solution

  • When your app looses focus it should execute onPause() and only be removed aka onStop() if the phone is short on resources. The other apps installed on the phone can have a big impact on how your app might behave with regards to this. If your app is resource hungry that would also be the variance on disparate devices.