Android Open Source - GpsExample Boot Receiver






From Project

Back to project page GpsExample.

License

The source code is released under:

MIT License

If you think the Android project GpsExample 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 me.kaipi.gpsexample;
/*from w w w  .j  a v  a2 s  . c o  m*/
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class BootReceiver extends BroadcastReceiver {

  @Override
  public void onReceive(Context context, Intent intent) {
    Intent serviceIntent = new Intent(context, GpsService.class);
    serviceIntent.putExtra(GpsService.BROADCAST_INTERVAL, GpsService.BROADCAST_INTERVAL_DEFAULT);
    context.startService(serviceIntent);
  }
  
}




Java Source Code List

me.kaipi.gpsexample.BootReceiver.java
me.kaipi.gpsexample.GpsService.java
me.kaipi.gpsexample.LocationReceiver.java
me.kaipi.gpsexample.MainActivity.java