0

I would like to throw an inactivity notification to the user if he has his app closed for 2 days.

I have a background activity that runs and do some stuff but how can i run something in background in order to calculate the 2 days and throw the notification?

Here is what is running in my background

  handler = new Handler();
    runnable = new Runnable() {
        public void run() {

            createNotificationChannel();

            handler.postDelayed(runnable, 10000);
        }
    };

    handler.postDelayed(runnable, 15000);
Alex
  • 1,816
  • 5
  • 23
  • 39

0 Answers0