*
* 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,
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
if (!isDeviceTrackingServiceRunning(context) && trackDevice) {
Log.d(TAG, "Starting device tracker service");
context.startService(deviceTrackingIntent);
if (!isDeviceTrackingServiceRunning(context) && trackDevice) {
Log.d(TAG, "Starting device tracker service");
context.startService(deviceTrackingIntent);