title: How to make android app send notification if you don't open it for a day?
body: <p><strong>Hello!!!</strong></p>
  <p>I try to make my app send notifications if isn't used for a day (or more time) but I'm not able to make it. I tried to implement it with code below but not worked. Any idea what I have to add to my code or how to make this possible?</p>
  <p><code>ActivityMain.java</code></p>
  <pre><code>public class MainActivity extends AppCompatActivity {
      private static final int NOTIFICATION_REMINDER_DAY = 3;
  ...
  protected void onCreate(Bundle savedInstanceState) {
  ...
          Intent notifyIntent = new Intent(this,NotificationReceiver.class);
          PendingIntent pendingIntent = PendingIntent.getBroadcast
                  (context, NOTIFICATION_REMINDER_DAY, notifyIntent, PendingIntent.FLAG_UPDATE_CURRENT);
          AlarmManager alarmManager = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
          alarmManager.setRepeating(AlarmManager.RTC_WAKEUP,  System.currentTimeMillis(),
                  1000 * 60 * 60 * 24, pendingIntent);
         
  </code></pre>
  <p><code>NotificationIntentService.java</code></p>
  <pre><code>  protected void onHandleIntent(Intent intent) {
          Notification.Builder builder = new Notification.Builder(this);
          builder.setContentTitle(&quot;D4rK Cleaner!!!&quot;);
          builder.setContentText(&quot;You didn't cleaned your phone for some time. Try now!&quot;);
          builder.setSmallIcon(R.drawable.ic_splash_screen);
          Intent notifyIntent = new Intent(this, MainActivity.class);
          @SuppressLint(&quot;UnspecifiedImmutableFlag&quot;) PendingIntent pendingIntent = PendingIntent.getActivity(this, 2, notifyIntent, PendingIntent.FLAG_UPDATE_CURRENT);
          //to be able to launch your activity from the notification
          builder.setContentIntent(pendingIntent);
          Notification notificationCompat = builder.build();
          NotificationManagerCompat managerCompat = NotificationManagerCompat.from(this);
          managerCompat.notify(NOTIFICATION_ID, notificationCompat);
  </code></pre>
  <p><code>NotificationReciver.java</code></p>
  <pre><code>  public void onReceive(Context context, Intent intent) {
          Intent intent1 = new Intent(context, NotificationIntentService.class);
          context.startService(intent1);
  </code></pre>
  <p>Thanks in advance!</p>