Search code examples
javaandroiddatabasesqliteandroid-studio-2.1

How to make a permanent signup account in android


I am making an app and I used sqlite as database. But whenever I uninstall and reinstall my app, previous accounts which I have made before uninstalling the app doesn't exists.

I want to make it the way that if user creates account on it and then uninstall that app, then whenever he/she will reinstall it, his /her previous signup account should be existing.

Is there any way to do so ? Please share. Thanks!


Solution

  • I suggest to use API call and SharedPreference for storing a particular user account on his device IMEI Number.

    Whenever user opens an app

    First Check whether the user account is exit in local, If not then check by using API call based on device IMEI number, And even if server don't have the info about the provided IMEI number then allow to login into APP.

    This will solve your problem permanently.