*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
import android.app.ActivityManager;
import android.app.ActivityManager.RunningServiceInfo;
import android.content.BroadcastReceiver;
import android.app.ActivityManager;
import android.app.ActivityManager.RunningServiceInfo;
import android.content.BroadcastReceiver;
public void onReceive(Context context, Intent intent) {
Intent deviceTrackingIntent = new Intent();
deviceTrackingIntent
public void onReceive(Context context, Intent intent) {
Intent deviceTrackingIntent = new Intent();
deviceTrackingIntent
SharedPreferences preferences = PreferenceManager
.getDefaultSharedPreferences(context);
boolean trackDevice = preferences.getBoolean("enable_devicetracking",
SharedPreferences preferences = PreferenceManager
.getDefaultSharedPreferences(context);
boolean trackDevice = preferences.getBoolean("enable_devicetracking",
private void startOrStopDeviceTracking(Context context, boolean trackDevice) {
Intent deviceTrackingIntent = new Intent();
deviceTrackingIntent
private void startOrStopDeviceTracking(Context context, boolean trackDevice) {
Intent deviceTrackingIntent = new Intent();
deviceTrackingIntent
context.startService(deviceTrackingIntent);
} else if (isDeviceTrackingServiceRunning(context) && !trackDevice) {
context.startService(deviceTrackingIntent);
} else if (isDeviceTrackingServiceRunning(context) && !trackDevice) {