There are many ways to save the Android device in registered list so that next time when the same device tries registering in the app it gives error of already registered.
1st way (Saving Unique Device Id on Server Database): Whenever user registers on an Android app, app sends your registration data along with your device ID to the server and server saves that in the database. Next time when the same device tries to register on the application it first checks for the same Device ID in database. If Device ID exists it gives alert that this device is already registered. If Device ID doesn’t exist it allows user to register.
2nd Way (Creating File on Local Device) : Whenever user registers on an Android app, app creates a file inside File Manager of a Device with a unique name and that file can’t be readable and store that file somewhere which is not accessible by the user. Next time when the user again tries to register on the application, it checks for that file, if that file exist that means user is already registered and it gives error message else it will allow user to register and creates the file in Local Drive.
3rd Way (Saving into Local Database) : Whenever user registers on an Android app, app creates a SQLite Database or SharedPreferences in local device and in that Database or SharedPreference, app creates a table with a boolean column ‘isRegistered’ and change the value to true. Next time when the user again tries to register on the application, it checks for that boolean variable isRegistered in the database. If that boolean is true it will give error message else it will allow user to register and again create database or SharedPreferences and add isRegistered with value as true.
All 3 of them have some pros and cons, so you have to think before using the solutions for your application.
1st Way : This is the best way as no user can change the data once stored in the database located at server. This will also work if user uninstalls the app, clears the mobile memory. But this fails when user hard reset his device as after hard reset this device id gets changed.
2nd Way : This is also a very good way as it will also works if someone uninstalls the app but this will fail when user clears his device memory (SD Card or internal memory).
3rd Way: This is not being used in which user will uninstall the app as once user uninstalls the app, all the database gets deleted. And when user again downloads the app from play store it will have blank database and user can install. So this can be used when user will not uninstall app and you have logout button. After logout user can’t register.
I have shared all possible solutions but i recommend you all to use 1st one as this is more reliable and works fine in all condition with fail probability of less than 1%