2

Basically I'm developing a social networking app and wanted to know, how I could give possible notifications to the users who have downloaded my app to open the app and use it. It could be on some time period too. But I want to know even when my app isn't running in the background, then how can I give notification to the user to open it and use it?

  • just a thought but maybe you can have your app write to some file in storage whenever it is opened. Then, you have a background service (which runs independent of the app), check this file and send a notif if the last time the app wrote to the file has exceeded some defined time period – a2345sooted May 09 '15 at 12:19
  • I'd focus on making an app people want to use all the time instead of finding ways to annoy them when they don't. – Jeffrey Bosboom May 10 '15 at 03:06

2 Answers2

3

For reminding you can use alarm manger. while exiting app sets alarm manager after 3 days.

If user opens app within 3 days then cancel alarm and while exiting app again set alarm manager

N J
  • 27,217
  • 13
  • 76
  • 96
0

whenever the user opens the app store the devices current date in your machine using SharedPreferences and keep a service running in the background which will check the systems current date and the date you have stored in your SharedPreferences and according to your logic when you think it is too much time give the notification

Links SharedPreferences & service

Community
  • 1
  • 1
Vishwajit Palankar
  • 3,033
  • 3
  • 28
  • 48