Java Code Examples for com.eveningoutpost.dexdrip.Services.G5CollectionService#keep_running()

The following examples show how to use com.eveningoutpost.dexdrip.Services.G5CollectionService#keep_running() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CollectionServiceStarter.java    From xDrip with GNU General Public License v3.0 5 votes vote down vote up
public void startBtG5Service() {//private
    Log.d(TAG, "starting G5 service");
    //if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR2) {
    PersistentStore.setBoolean(pref_run_wear_collector, true);

    if (!Pref.getBooleanDefaultFalse(Ob1G5CollectionService.OB1G5_PREFS)) {
        G5CollectionService.keep_running = true;
        this.mContext.startService(new Intent(this.mContext, G5CollectionService.class));
    } else {
        Ob1G5CollectionService.keep_running = true;
        this.mContext.startService(new Intent(this.mContext, Ob1G5CollectionService.class));
    }
    //}
}
 
Example 2
Source File: CollectionServiceStarter.java    From xDrip with GNU General Public License v3.0 5 votes vote down vote up
private void stopG5ShareService() {
    Log.d(TAG, "stopping G5 service");
    G5CollectionService.keep_running = false; // ensure zombie stays down
    this.mContext.stopService(new Intent(this.mContext, G5CollectionService.class));
    Ob1G5CollectionService.keep_running = false; // ensure zombie stays down
    this.mContext.stopService(new Intent(this.mContext, Ob1G5CollectionService.class));
}
 
Example 3
Source File: CollectionServiceStarter.java    From xDrip with GNU General Public License v3.0 5 votes vote down vote up
private void startBtG5Service() {
    // Log.d(TAG,"stopping G5 service");
    // stopG5Service(); // TODO diabled due to multiple service restarts but others may suffer same problems - needs rework
    Log.d(TAG, "starting G5 service");
    //if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR2) {
    if (!Pref.getBooleanDefaultFalse(Ob1G5CollectionService.OB1G5_PREFS)) {
        G5CollectionService.keep_running = true;
        startServiceCompat(new Intent(this.mContext, G5CollectionService.class));
    } else {
        Ob1G5CollectionService.keep_running = true;
        startServiceCompat(new Intent(this.mContext, Ob1G5CollectionService.class));
    }
    //}
}
 
Example 4
Source File: CollectionServiceStarter.java    From xDrip with GNU General Public License v3.0 5 votes vote down vote up
private void stopG5Service() {
    Log.d(TAG, "stopping G5  services");
    G5CollectionService.keep_running = false; // ensure zombie stays down
    this.mContext.stopService(new Intent(this.mContext, G5CollectionService.class));
    Ob1G5CollectionService.keep_running = false; // ensure zombie stays down
    this.mContext.stopService(new Intent(this.mContext, Ob1G5CollectionService.class));
    Ob1G5CollectionService.resetSomeInternalState();
}
 
Example 5
Source File: CollectionServiceStarter.java    From xDrip-plus with GNU General Public License v3.0 5 votes vote down vote up
public void startBtG5Service() {//private
    Log.d(TAG, "starting G5 service");
    //if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR2) {
    PersistentStore.setBoolean(pref_run_wear_collector, true);

    if (!Pref.getBooleanDefaultFalse(Ob1G5CollectionService.OB1G5_PREFS)) {
        G5CollectionService.keep_running = true;
        this.mContext.startService(new Intent(this.mContext, G5CollectionService.class));
    } else {
        Ob1G5CollectionService.keep_running = true;
        this.mContext.startService(new Intent(this.mContext, Ob1G5CollectionService.class));
    }
    //}
}
 
Example 6
Source File: CollectionServiceStarter.java    From xDrip-plus with GNU General Public License v3.0 5 votes vote down vote up
private void stopG5ShareService() {
    Log.d(TAG, "stopping G5 service");
    G5CollectionService.keep_running = false; // ensure zombie stays down
    this.mContext.stopService(new Intent(this.mContext, G5CollectionService.class));
    Ob1G5CollectionService.keep_running = false; // ensure zombie stays down
    this.mContext.stopService(new Intent(this.mContext, Ob1G5CollectionService.class));
}
 
Example 7
Source File: CollectionServiceStarter.java    From xDrip-plus with GNU General Public License v3.0 5 votes vote down vote up
private void startBtG5Service() {
    // Log.d(TAG,"stopping G5 service");
    // stopG5Service(); // TODO diabled due to multiple service restarts but others may suffer same problems - needs rework
    Log.d(TAG, "starting G5 service");
    //if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR2) {
    if (!Pref.getBooleanDefaultFalse(Ob1G5CollectionService.OB1G5_PREFS)) {
        G5CollectionService.keep_running = true;
        startServiceCompat(new Intent(this.mContext, G5CollectionService.class));
    } else {
        Ob1G5CollectionService.keep_running = true;
        startServiceCompat(new Intent(this.mContext, Ob1G5CollectionService.class));
    }
    //}
}
 
Example 8
Source File: CollectionServiceStarter.java    From xDrip-plus with GNU General Public License v3.0 5 votes vote down vote up
private void stopG5Service() {
    Log.d(TAG, "stopping G5  services");
    G5CollectionService.keep_running = false; // ensure zombie stays down
    this.mContext.stopService(new Intent(this.mContext, G5CollectionService.class));
    Ob1G5CollectionService.keep_running = false; // ensure zombie stays down
    this.mContext.stopService(new Intent(this.mContext, Ob1G5CollectionService.class));
    Ob1G5CollectionService.resetSomeInternalState();
}