android - Skipping an activity in a sequence of activities (including a facebook activity) -


i creating android app action bar sherlock library. action bar has 3 tabs, 1 tab requires user login via facebook. there 3 activities in login process:

step 1 - user clicks on image button (facebook) in 1 of action bar tabs, calls facebook login activity.

step 2 - facebook login activity shows facebook web view, stores users details in shared preferences , calls final activity

step 3 - final activity displays data belonging user , user can logout activity.

question:

is possible skip activity when going i.e if user in final step (3) when press button go step 1. step 2 not in sequence when user has logged in.

and in addition possible skip step 1 - step 3 if user has logged in?

i've thought of overriding button in step 3 wanted concrete thoughts on i'm still new android.

if situation have overridden onbackpressed method or can try hoan nguyen's solution.

if user has logged in can check access token in shared preferences(if have stored on successful login. can remove token while doing logout.) , if found can redirect step 3 else step 2.


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -