skip to Main Content

Some applications don’t need to get your email, username, password credentials to know who you are. For example you download a mobile application. After that you made some choose like you are man, you are 25 years old etc. And the application remembers that until you remove application. Is there a unique ID for Android devices to get? I have made a snake game recently. I get email and password information to know which user is while I was changing score. But for this usage I don’t know how to proceed. By the way I am developing my application using Jetpack Compose on Android Studio.
Thank you in advance.

2

Answers


  1. Yes, that is very easy. Follow the steps below:

    1. Create an SQLite database and store your details (gender, age, etc) there.
    2. Create one extra filed (Boolean type) and name it as "autoLogin" which should be initially false.
    3. Once you fill your details (gender, age, etc), set "autoLogin" to true
    4. Inside main_activity, check value of "autoLogin" field. If it is true then start your GameActivity, else prompt user to fill details.

    if you still feel any issue, let me know. I will share the code for that. Hope it will help.

    Login or Signup to reply.
  2. Make an in-app database using Sqlite or room database. Save all data into it when user input it for the first time.

    Than when user want auto login system just use that previous data. That’s it simple thing. Let me know If I can help you

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search