|
|
|
@ -8,6 +8,8 @@ import android.os.Bundle;
|
|
|
|
import android.util.Log;
|
|
|
|
import android.util.Log;
|
|
|
|
import android.content.Context;
|
|
|
|
import android.content.Context;
|
|
|
|
import android.location.GpsStatus.NmeaListener;
|
|
|
|
import android.location.GpsStatus.NmeaListener;
|
|
|
|
|
|
|
|
import android.view.WindowManager;
|
|
|
|
|
|
|
|
import android.view.ViewGroup.LayoutParams;
|
|
|
|
|
|
|
|
|
|
|
|
public class spOSMrNActivity extends NativeActivity {
|
|
|
|
public class spOSMrNActivity extends NativeActivity {
|
|
|
|
private static final String TAG = "spOSMroute Java";
|
|
|
|
private static final String TAG = "spOSMroute Java";
|
|
|
|
@ -19,6 +21,7 @@ public class spOSMrNActivity extends NativeActivity {
|
|
|
|
private LocationListener mLocListener;
|
|
|
|
private LocationListener mLocListener;
|
|
|
|
|
|
|
|
|
|
|
|
public void onCreate(Bundle savedInstanceState) {
|
|
|
|
public void onCreate(Bundle savedInstanceState) {
|
|
|
|
|
|
|
|
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
|
|
|
mLocMan = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
|
|
|
|
mLocMan = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
|
|
|
|
mLocListener = new MyLocationListener();
|
|
|
|
mLocListener = new MyLocationListener();
|
|
|
|
mLocMan.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, mLocListener);
|
|
|
|
mLocMan.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, mLocListener);
|
|
|
|
@ -76,6 +79,7 @@ public class spOSMrNActivity extends NativeActivity {
|
|
|
|
// Do some cleanup
|
|
|
|
// Do some cleanup
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onDestroy() {
|
|
|
|
public void onDestroy() {
|
|
|
|
|
|
|
|
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
|
|
|
super.onDestroy();
|
|
|
|
super.onDestroy();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|