Automatic Login using IMEI number

I checked out Bugs in Kodular Eagle before creating a new topic

After it shows

Steps to reproduce the issue

Expected Behaviour

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.

Actual Behaviour

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.

Show your Blocks

I have attached the Block image

Android version

4+

In Screen 1 Initialise you should put:

If IMEI is present in Tiny DB1
Then open Main Menu
Else open Account Sign up screen

This is of course pseudocode but I hope you know enough about Kodular to translate it into blocks.

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.

very grateful again for your solution

1 Like

If a user deletes the app and reinstalls in and you’re only saving to TinyDB then they will need to sign up again.

By saving the IMEI to firebase you can get the device IMEI when they open the app after reinstalling it and check to see if it exists in firebase. If it does then they go to the Main Menu.

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

Screenshot_20200520-080836

1 Like

thanks a lot to everyone that came through to assist me. on the last solution posted by ice, the solution worked when we add a complete conditional statement like this — if(is in list? thing…) = true

Keep in mind, IMEI isn’t working on Android 10+

2 Likes

thank you for the heads up @Boban. i am so screwed, we are launching our eKhonnector App on Tuesday 16 June

1 Like