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 ww w. jav a 2 s . c o m import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.location.Location; import android.util.Log; public class LocationReceiver extends BroadcastReceiver { private static final String TAG = "LocationReceiver"; @Override public void onReceive(Context context, Intent intent) { Location location = intent.getParcelableExtra("location"); Log.d(TAG, "Location received: " + location.getTime()); Log.d(TAG, "Thread id: " + Thread.currentThread().getId()); } }