I have a game and I want to send a notification every few hours that the app was closed without opening it. To make these notifications isn't the problem, but I have no idea how to count the time that the app was not used? Should I save in local file like App Preference class? Or is there different way?
For example: I played the game and then closed it. I didn't touch the game for one day, and then I received a notification "Come back blah blah and play blah blah"