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

1 Like

try like this

1 Like

Or another approach with true/false boolean

image

When user login save in tinyDB

image

When user logout save in tinyDB

image

2 Likes

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

1 Like

Do you use a clock component in Screen 1 ?

1 Like

No i am not

1 Like

tried your blocks but not working

1 Like

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

1 Like

Try this

Login_check.aia (3.7 KB)

or

Login_check.apk (5.1 MB)

1 Like