title: Alarm Manager is not invoking Broadcast receiver
body: <p>I have two issues of Alarm manager. One is i want to repeat alarm every 10 seconds and other is my Broadcast Receiver is invoking after 10 second.</p>
  
  <p>When i use Activity instead of Broadcast Receiver it is working But Broadcast Receiver is not working. And time is not proper some time it works in 1 min and some times it works i 50 Seconds. But i need every 10 Second.</p>
  
  <p>My code is:</p>
  
  <pre><code> buttonStart.setOnClickListener(new Button.OnClickListener(){
  
   @Override
  
          public void onClick(View arg0) {
  
              // TODO Auto-generated method stub
  
              long tenMin = 1000/5  ;//here is 30 seconds
              Intent intent = new Intent(MainActivity.this, MyBroadcastReceiver.class);
              PendingIntent pendingIntent = PendingIntent.getActivity(MainActivity.this,
                      0, intent, 0);
              AlarmManager am =
                      (AlarmManager)getSystemService(Activity.ALARM_SERVICE);
              am.setRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis(), tenMin, pendingIntent);
  
          }});
  </code></pre>
  
  <p>BoradcastReceiver.java</p>
  
  <pre><code>public class MyBroadcastReceiver extends BroadcastReceiver {
  
      @Override  
      public void onReceive(Context context, Intent intent) {
  
          Toast.makeText(context, "Alarm....", Toast.LENGTH_LONG).show();
      }  
  }  
  
  
  Manifest file:
  
  &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: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;service android:name=".MyAlarmService" /&gt;
  
          &lt;receiver
              android:name=".MyBroadcastReceiver"
              android:process=":remote"&gt;&lt;/receiver&gt;
  
          &lt;activity android:name=".SecondActivity"&gt;&lt;/activity&gt;
      &lt;/application&gt;
  
  &lt;/manifest&gt;
  </code></pre>