Can somebody help me in suggesting some good tutorial where I can start.
I want to build a simple application with a dashboard and a login screen. For the first time user is asked for a log-in screen. login check is carried out via a POST call to a remote PHP script. Once the user is logged in he/she should be redirected to dashboard. Once the user closes and reopens the application he’she should be redirected to login screen.
i know how to create forms and how to post, help is needed in the area of switching layouts based on user roles and how to import/extend classes, for example I prefer to have a separate log in (activity) class. but this login class need to be imported to Main (main should extend Activity)
Not sure I understand your question fully but when it comes to starting and finishing Activities this tutorial is very good:
http://developerlife.com/tutorials/?p=302
If you want the user to be, as you call it, re-directed to the login screen when returning to the app after having had it in the background on solution is to catch the onStop() event in your Main activity. This event is fired when the user leaves the application.
If you explain the line “but this login class need to be imported to Main” further I might be able to answer that question as well.