Thursday, February 10, 2011

[android-developers] Re: How to intercept when the application is brought to foregroud from background

Hi Mark,
Thanks for validating our approach.

"If you are called with onResume() and not onCreate(), you are coming
back onto the screen after having not been on the screen."....

There are 2 possibilities,
1. you come back to the same screen (activity) due to the application
flow. Navigate to other activities and come back to it due to
application functionality.
2. you come back after you navigate away to another application.

Is there a way to recognize this using the application attributes or
context attributes.

Regards
Hari

On Feb 10, 2:24 pm, Mark Murphy <mmur...@commonsware.com> wrote:
> On Thu, Feb 10, 2011 at 2:19 PM, Hari <mba.for.d...@gmail.com> wrote:
> > Out Mobile Application required the user to provide username and
> > password to login.
>
> Why?
>
> > After login, if the user navigates to another
> > application and tries to come back to our application again, i would
> > like to intercept this action and redirect the user to login screen
> > and then lead to where ever he was before.
>
> > How can i achieve this?
>
> onResume()
>
> > Currently we are doing it a very crude way by tracking the user's
> > action in variables and in onResume() we check for the value of the
> > variable and make a decision if he should continue or be redirected to
> > login.
>
> Sounds about right.
>
> > Is there something to the order of an "Interceptor" which can use tell
> > me if the application coming to foreground was actually in the
> > background and not a new process.
>
> If you are called with onResume() and not onCreate(), you are coming
> back onto the screen after having not been on the screen.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android App Developer Books:http://commonsware.com/books

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate