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)
When users log in to your application, store the login status into sharedPreference and clear sharedPreference when users log out. Check every time when the user enters into the application if user status from shared Preference is true then no need to log in again otherwise direct to the login page.
An activity is the entry point for interacting with the user. It represents a single screen with a user interface. For example, an email app might have one activity that shows a list of new emails, another activity to compose an email, and another activity for reading emails.
An app ID is a unique ID number assigned to your apps when they're added to AdMob. The app ID is used to identify your apps. An ad unit ID is a unique ID number assigned to each of your ad units when they're created in AdMob. The ad unit ID is added to your app's code and used to identify ad requests from the ad unit.
this article will hepls you creating screen Android Login and Registration Screen Design
Also tutorial about Android Login and Registration with PHP, MySQL and SQLite
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With