简体   繁体   中英

activity redirection problem in android

hi all i have an app with 3 activity. if i launch the app the first time it have to redirect to second activity from first activity. after the first time launch the app it have to go to third activity from first activity. how to do that? please help me. is there way to without using database?

Set a boolean flag in the SharedPreferences . On loading your application you can read that flag.

  • If it is null: goto Activity 2 and set the flag to true
  • If it exists: goto Activity 3

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM