Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the startup activity in android [closed]

For the first time use of the application I will show the user with a login screen which i will defined in manifest file as "android.intent.action.MAIN". After a successful login, each time application starts I want the user to see the home screen. Please let me know how i can achieve this.

Also please let me know is there any way I can change the MAIN activity programmatically after a successful login, So that I can redirect to the home screen.

Thanks,

Vijay

like image 613
vijaykumarg Avatar asked Dec 14 '25 06:12

vijaykumarg


1 Answers

What if you subclass Application class and call the activity you need from your Application's onCreate() ? And in the manifest you remove that intent.MAIN.

like image 197
Alexander Kulyakhtin Avatar answered Dec 15 '25 22:12

Alexander Kulyakhtin