Users create an account by entering their 1. phone number and 2. name&surname then this app will automatically get the IMEI number of the user’s device, which is then used as a (USER_ID) primary key in firebase.
When the account has been created, the user will be navigated to the main menu of this app. (1.)If the user restarts the app we want the app to automatically check if the device IMEI has been registered in the Users_Database, if the IMEI matches an IMEI number(UserID) in the database then the app will automatically navigate to the main menu else must show the create account page. This feature should work even when the user has deleted the app and reinstalled it again in this same device.
The app keeps showing the create account page even when the user_ID(IMEI number) is in the database already, basically refusing to automatically login.
Thanks a lot Dean Artis your solution should work for case 1.(when the user restarts the app). case 2.(when the user deletes the app and reinstalls it), lemme try to match up the values from tinydb and firebase when screen 1 intialises, hopefully this should work for case 2.
that’s the part that is giving me a hard time because I have tried testing the code snippets piece by piece,1. tested to display the IMEI number when Screen 1 initialise from “firebase got tag list” and it worked and also tested displaying the IMEI number and it also worked but when i combine the code it refuses to work
How about you don’t save it to Firebase at all? Put in your app description that their security information is stored only on their phones and that if they delete and reinstall they will have to sign up again.
You can call this a “Security Feature” for their protection. They don’t need to know that the reality is you can’t code the relevant blocks.
Follow this simple step,
Once screen initialize allow user to fill the form.
After filling the form and click save, call fire base tag list.
When firebase got tag list. Ask firebase to check if the Imei number is in list, if yes then welcome the user back, if no then ask the firebase to store value.
For user coming back the second time,
Ask tiny db to save Imei value when firebase complete its work. Now put a if statement on screen initialize. If tiny gb have value then open another screen