I would like to send notifications when the user doesn't use/open the application after a time period. For example, if the user does not open the application for 1 minute. A notification will be displayed with the message "We miss you".
Setup a scheduled alarm: https://developer.android.com/training/scheduling/alarms (there is also a example to start the alarm after booting the device)
And check if your app is running or not: https://stackoverflow.com/a/4213851/284308
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.