Android Open Source - SSPIA Broadcast Rec

From Project

Back to project page SSPIA.


The source code is released under:

MIT License

If you think the Android project SSPIA listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.fiec.sspia.system;
/* ww  w .  j  a v  a2  s  . c om*/
import java.util.Calendar;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class BroadcastRec extends BroadcastReceiver{
  protected final static String _BOOT = "android.intent.action.BOOT_COMPLETED";
  protected Intent push;

  public void onReceive(Context context, Intent intent) {
      AlarmManager service = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
      Intent in = new Intent(context, StartingNotis.class);
      PendingIntent pintent = PendingIntent.getBroadcast(context, 0, in, 
      Calendar cal = Calendar.getInstance();
      cal.add(Calendar.SECOND, 10);
      service.setInexactRepeating(AlarmManager.RTC_WAKEUP, cal.getTimeInMillis(),
          AlarmManager.INTERVAL_HOUR*6, pintent);


Java Source Code List