Back to project page GpsExample.
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.
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); } }