0

In my Android app there are 3 activities.. 1st one has username(textView and EditText),email(textView and EditText),password(textView and EditText).... 2nd one has Alternate number(textView and EditText) User has to enter all these only once when he starts app for the first time(i.e just once after download) and all these should be saved somewhere in storage.. 3rd activity displays all these information together along with device id and sim Number..

so when the user starts the app for the second time,directly 3rd activity should be displayed..How can i do this???

Harsh25
  • 33
  • 5
  • 2
    use sharedpreferences. have a boolean value if you have entered all the details its true. check if its true start third activity else the 1st – Raghunandan Mar 17 '15 at 04:18
  • 1
    Thanks a lot..This is my first app ..so i do not know some basic stuffs.. I'll do a research on it.. – Harsh25 Mar 17 '15 at 04:24
  • also why don't you put all your entry details in one activity. You can have a scrollview. – Raghunandan Mar 17 '15 at 04:27
  • Yeah true..I shall do that..Thanks..its really helpful.. – Harsh25 Mar 17 '15 at 04:32
  • [See This please](http://stackoverflow.com/questions/3624280/how-to-use-sharedpreferences-in-android-to-store-fetch-and-edit-values) – nobalG Mar 17 '15 at 04:33

2 Answers2

0

There are multiple options to store informations for your app like :

  • Shared Preferences
  • Internal Storage
  • External Storage
  • SQLite Databases
  • Network Connection
Tharif
  • 13,794
  • 9
  • 55
  • 77
0

The manifest could make the 3rd Activity as the initial one. In the 3rd Activity's onCreate, check from SharedPreferences if initialization has taken place. If not, start 1st Activity. If yes, continue normally.

Shirish Hirekodi
  • 392
  • 4
  • 13