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
seeing:

onPause
onDestroy
onCreate
onResume
onPause

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. Returning to previous screen after receiver activity.

Hello ...

I have a app that has a activity that can be started from the start
menu and a activity that is strated by a intent receiver.

Now on boot , if the receiver is called , the activity is
started...after backing out of this activity user returns to previous
screen (could be home or whatever user was doing) .. this is how it
should be.

But if i start the other activity from the main launcher, and press
the home button to go back to the home screen..the problem begins.
Now if the receiver is called , and user backs out of receiver
activity..the main (still running in background) activity is shown...

This is not how i want it..because it causes users after dismissing a
calendar event (the purpose of my app) to return to eg the settings
from the main app..

If i call finish() in onpause , it works ok...but that is not the way
it should work.

Any clues?

Hope the problem is clear , since english isn't my first language i
found it hard to explain the problem :-)

Thanks..

-- 

2. Display indeterminate progressbar in Status bar on Android

Hello,

I am trying to display an animated graphic identical to the
indeterminate progress bar (not the horizontal one, but the circular
one) in the status bar while my on-going notification is alive.

I tried to find the resource ID corresponding to the indeterminate
progress bar, but found that it is animated via code.

I tried setting the icon ID in my Notification instance to an animated
GIF, but only the first frame of the GIF is displayed in the Status
bar.

If I set the icon ID to
android.R.drawable.progress_indeterminate_horizontal, the graphic
animates perfectly. So, my question is- how is the animation achieved
in this case? Through iconLevel? How can I set an animated icon
without requiring to animate it periodically myself?

Any pointers will be really appreciated.

Thanks,

Akshay

-- 

3. I'm stuck - global variable problem

4. Bluetooth Walkie Talkie

5. smime on android

6. always show divider of ListView?

7. tasks and activity