Dont open another screen if TinyDB tag is not set

I have implemented a logic where if TinyDB tag is set then user will be taken directly to main screen ignoring the 1st screen of the app.

If TinyDB tag is not available(user not logged in), user must stay on screen login screen

With the current condition, even if user is logged in or not (TinyDB tag contains value or not) user get directly navigated to main screen

Solution needed: User must stay on screen1(login screen) if TinyDB doesnt contain tag

try like this

Or another approach with true/false boolean

image

When user login save in tinyDB

image

When user logout save in tinyDB

image

1 Like

Not working. if user not logged in then when i close and reopen the app the screen1 closes and reopens continuously in a loop and cant close the app

Do you use a clock component in Screen 1 ?

No i am not

tried your blocks but not working

Then you are doing somewhere wrong… Me and dora paz block will work without any problem. show your full block or share aia

Try this

Login_check.aia (3.7 KB)

or

Login_check.apk (5.1 MB)