How to send notification if user inactive for 3 days

前端 未结 2 1951
抹茶落季
抹茶落季 2020-12-10 06:56

I am developing an android app and I want to send \"We Miss You\" notification to user if he/she is inactive for more than 3 days. This means if the user does not open our a

2条回答
  •  时光说笑
    2020-12-10 07:21

    You could have something like:

    When a user opens the app, you record it on a database on your website and have a cron job (or some other equivalent) to run everyday at say 3pm time and if the users last open date is over 3 days ago you send the notification.

    OR

    When a user opens the app, you record it on a sqlite database on your app and set an alarm manager for 3 days time. Each time the app is open the alarm is reset. After the 3 days is up you create a notification.

提交回复
热议问题