How do you know if someone is still online or offline in your app?

Hey Guys,
I am making an app which where I want to log Online or offline of the user status if the user is in the app I can make it online but when he leaves it I want to log Offline in the database which is a google spreadsheet. (This is a multiplayer online game)

Sai Neela

Use the tiols extension together with irs ActivityStateChanged event

If state = stop
Then logout
If state = resume
Then login


this doesnt work properly like if I leave the app then I dont see the database showing the user offline it shows offline when I log on into the app again and after a few seconds resume IDK whats happening

Show us your blocks

How many states in the activity state changed event? Have your deal them all?

what do you mean According to taifun's tutorials on his website for the extension he mentioned these states