title: Why notification doesn't work?
body: <p>I want to create a notification that works every 5 minute,for example. For this, I use BroadCastReceiver. Here is my code: </p>
  
  <pre><code>   public void notifyMe()
     Calendar calendar = Calendar.getInstance() ;
  
      calendar.set(Calendar.HOUR,0);
  
      calendar.set(Calendar.MINUTE,5);
  
      calendar.set(Calendar.SECOND,0);
  
  
      Log.d("tagger",calendar.getTime().toString());
  
  
  
      Intent intent = new Intent(this,MyBroadcastReceiver.class);
  
      PendingIntent sender = PendingIntent.getBroadcast(this,0,intent,PendingIntent.FLAG_CANCEL_CURRENT);
  
      AlarmManager am = (AlarmManager)this.getSystemService(Context.ALARM_SERVICE);
  
      am.setInexactRepeating(AlarmManager.RTC_WAKEUP,calendar.getTimeInMillis(),5*60*1000,sender);
     }
  </code></pre>
  
  <p>Also for Receiver:</p>
  
  <pre><code>public class MyBroadcastReceiver extends BroadcastReceiver {
  
  private static final int NOTIFY_ID = 101;
  
  
  
  @Override
  public void onReceive(Context context, Intent intent) {
  
      Log.d("BroadcastReceiver", "debut receive");
  
  
      Intent resultIntent  =  new Intent(context,DetailActivity.class) ;
  
      PendingIntent resultPendingIntent = PendingIntent.getActivity(context,
              0, resultIntent, PendingIntent.FLAG_UPDATE_CURRENT);
  
      Notification.Builder mBuilder = new Notification.Builder(context)
              .setContentTitle("title")
              .setContentText("some text");
  
      mBuilder.setAutoCancel(true);
  
      mBuilder.setContentIntent(resultPendingIntent);
  
      int id = 001 ;
  
      NotificationManager mNotifyManager = (NotificationManager)context.getSystemService(Application.NOTIFICATION_SERVICE);
  
      mNotifyManager.notify(id,mBuilder.build());
  }
  }
  </code></pre>
  
  <p>Manifest:</p>
  
  <pre><code>   &lt;application
      android:allowBackup="true"
      android:icon="@mipmap/ic_launcher"
      android:label="@string/app_name"
      android:roundIcon="@mipmap/ic_launcher_round"
      android:supportsRtl="true"
      android:name=".PrefsApplication"
      android:theme="@style/AppTheme"&gt;
      &lt;activity android:name=".MainActivity"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
      &lt;activity android:name=".DetailActivity" /&gt;
      &lt;activity android:name=".ActionsActivity"
  
          &gt;&lt;/activity&gt;
  
      &lt;receiver android:name=".MyBroadcastReceiver"&gt;
  
  
  
      &lt;/receiver&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p></p>
  
  <p>What it doesn't work? I didn't forget to add receiver to the manifest. I need to use Service instead of Receiver?</p>