power button hitting onCreate

by scottrick49 » Fri, 23 Apr 2010 08:05:46 GMT

Sponsored Links
 In my application, if you press the power button on the phone, i am


getting called in that order; I can't figure out why the app is
getting created again and then re-paused.  Obviously I am doing
something incorrect, but I am not sure what.  Anybody seen anything
like this before?


power button hitting onCreate

by Dianne Hackborn » Fri, 23 Apr 2010 09:15:47 GMT

 When you turn off the device, the lock screen is displayed.  This typically
forces the display to a particular orientation.  If the screen is not
currently in that orientation, it will need to be changed, and the top
activity's configuration appropriately changed to match.


Sponsored Links

Other Threads

1. How To Disconnect a Bluetooth Device With The HOME Button

My application connects to multiple bluetooth devices. I want to stop the 
connection whenever the user leaves the app, including when they press the 
HOME button. However I have no way of detecting when HOME is pressed, which 
will keep the bluetooth connection running, thus continuing to drain the 
battery of the phone. All of the examples I've found, including the ones in 
the Android Developer site, do not take care of disconnecting when leaving 
the app.

I can check to see if the user completely backs out of the application using 
the BACK button, but not the HOME. Is there a way that I can accomplish this 
without having to wait for the phone to decide it needs more memory and then 
destroy the activity?


2. Two activities in one window


I'm developing an application where the users can modify the internet
access point settings, but because the apn settings are secure
settings they can't be changed programmatically. So what I would like
to do is to open the apn settings activity and in the same window show
the values that the user should input to the settings. I have been
trying to look the ActivityGroup API but couldn't figure out if this
is possible to do with that. Anyone have any ideas how to show two
activities (one with the setting values, and another one where to
input the values) in the same window so the user doesn't have to
switch between activities?? Or any other ideas how the user could
modify the secure settings easily?



3. Resuming Previous Activity Properly

4. modifying build.prop on emulator

5. Sharing gps stuff between several activity

6. Record the Output audio from device

7. EditText View control distorted in a qvga android phone as well as the emulator