How to store data when user is offline

Its simple , so simple
send timestamp from user one every 2 second(it dont take that much data)
and when time stamp gets old by one minute means user get offline,so set last seen as that timestamp
now if you want to show in second user app then just add these i said above
it will say online if timestamp is not old by one minute (or you decide like 10second) else it will show last seen as timestamp

2 Likes