La planification de l'alarme toutes les 2 minutes android

Dans ma classe d'activité

protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        AlarmManager alarmManager=(AlarmManager) getSystemService(ALARM_SERVICE);
        Intent intent = new Intent(MainActivity.this, AlarmReceiver.class);
        PendingIntent pendingIntent = PendingIntent.getBroadcast(MainActivity.this, 0, intent, 0);
        alarmManager.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP,System.currentTimeMillis(),2000, pendingIntent);

    }

Et Mon onrecieve fonction dans alarmreciever classe

     @Override
     public void onReceive(Context context, Intent intent)
      {   
        //get and send location information
         System.out.println("fired");
      }

Je suis en utilisant le nexus 4, kitkat version. Je ne vois pas de onreceive fonction déclenche toutes les 2 minutes.nthg qui se passe...
toute aide? merci

 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.alarmexample"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="20" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name" >
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <receiver
        android:name="com.example.AlarmExample"
        android:exported="false" >
    </receiver>
</application>
 </manifest>

Je viens de mettre mon manifeste ainsi. ................................................

avez-vous mis le récepteur d'alarme nom de la classe dans votre manifeste ?
oui. ...........

OriginalL'auteur user3278732 | 2014-10-26