i have a scenario, user logins and goes to activity A in my android application, now i have a requirement to validate user after every three hours
if application is running and 3 hours passed then take him to login screen, if not then just remove session value from prefrence file
which technique should i used for this? service? or what ?
any help would be appreciated.
A service could be used to do this. Where you have an alarm that you set 3 hours in advance and keep checking the Session and ensure that the session is valid.