Thanx Ali

         For your quick reply I have tried this in different way i.e.
i am putting one boolean variable called "isAppInFront" in Application
extended class and i am keep on updating this variable form onStart()
and onStop() method but the problem is as i have said i have many
activity so while switching one activity to another activity i.e.
activityA and acivityB, activityA starts activityB in that activityB's
onStart() method calls first and then activityA's onStop() so in that
case may variable will not hold actual states. And i think the same
Problem will have with the permanent Storage.

        But i have solved this temporarily by setting "isAppInFront"
variable on onStart() method of all Activity i have and desetting that
variable only form the exit point of my app say Dashboard in on
onBackPressed() method coz it is called earlier than previous screen's
onStart method and never close your activity by saying finish() method
just call onBackPressed() in that call super.onBackPressed(), and your
activity get closed form this.

Thanks & Regards
      Animesh Sinha.

On Oct 21, 2:12 am, Ali Chousein <[email protected]> wrote:
> You know when onPause()-OnStop()-onDestroy() of your activities are
> called. Inside one of these methods write your state to permanent
> storage (e.g. DB, shared preferences, even plain text file, you name
> it). Later on you can read which state you are in from permanent
> storage. I don't know if there are better ways of doing this, but this
> simple approach should work.
>
> -------------------------------------------------
> Ali Chousein
> Weather-Buddyhttp://weatherbuddy.blogspot.com/|http://twitter.com/weather_buddy
> Geo-Filtered Assistanthttp://geo-filtered-assistant.blogspot.com/

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to