protected void startInForeground() { foregroundServiceStarter = new ForegroundServiceStarter(getApplicationContext(), service); foregroundServiceStarter.start(); foregroundStatus(); }
protected void startInForeground() { foregroundServiceStarter = new ForegroundServiceStarter(getApplicationContext(), service); foregroundServiceStarter.start(); foregroundStatus(); }
protected void startInForeground() { foregroundServiceStarter = new ForegroundServiceStarter(getApplicationContext(), service); foregroundServiceStarter.start(); foregroundStatus(); }
protected void startInForeground() { foregroundServiceStarter = new ForegroundServiceStarter(getApplicationContext(), service); foregroundServiceStarter.start(); foregroundStatus(); }
protected void startInForeground() { foregroundServiceStarter = new ForegroundServiceStarter(getApplicationContext(), service); foregroundServiceStarter.start(); foregroundStatus(); }
protected void startInForeground() { new ForegroundServiceStarter(getApplicationContext(), this).start(); foregroundStatus(); }
protected void startInForeground() { new ForegroundServiceStarter(getApplicationContext(), this).start(); foregroundStatus(); }
@Override public void onCreate() { foregroundServiceStarter = new ForegroundServiceStarter(getApplicationContext(), this); foregroundServiceStarter.start(); dexCollectionService = this; prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); listenForChangeInSettings(); UserError.Log.i(TAG, "onCreate: STARTING SERVICE"); }
public void onSharedPreferenceChanged(SharedPreferences prefs, String key) { if(key.compareTo("run_service_in_foreground") == 0) { Log.d("FOREGROUND", "run_service_in_foreground changed!"); if (prefs.getBoolean("run_service_in_foreground", false)) { foregroundServiceStarter = new ForegroundServiceStarter(getApplicationContext(), service); foregroundServiceStarter.start(); Log.i(TAG, "Moving to foreground"); } else { service.stopForeground(true); Log.i(TAG, "Removing from foreground"); } } } };
@Override public void onCreate() { foregroundServiceStarter = new ForegroundServiceStarter(getApplicationContext(), this); foregroundServiceStarter.start(); dexCollectionService = this; prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); listenForChangeInSettings(); UserError.Log.i(TAG, "onCreate: STARTING SERVICE"); }
@Override public void onCreate() { super.onCreate(); readData = new ReadDataShare(this); service = this; foregroundServiceStarter = new ForegroundServiceStarter(getApplicationContext(), service); foregroundServiceStarter.start(); final IntentFilter bondintent = new IntentFilter(BluetoothDevice.ACTION_BOND_STATE_CHANGED); registerReceiver(mPairReceiver, bondintent); prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); listenForChangeInSettings(); //bgToSpeech = BgToSpeech.setupTTS(getApplicationContext()); //keep reference to not being garbage collected instance = JoH.ts(); }
public void onSharedPreferenceChanged(SharedPreferences prefs, String key) { if(key.compareTo("run_service_in_foreground") == 0) { Log.d("FOREGROUND", "run_service_in_foreground changed!"); if (prefs.getBoolean("run_service_in_foreground", false)) { foregroundServiceStarter = new ForegroundServiceStarter(getApplicationContext(), service); foregroundServiceStarter.start(); Log.i(TAG, "Moving to foreground"); } else { service.stopForeground(true); Log.i(TAG, "Removing from foreground"); } } } };
@Override public void onCreate() { super.onCreate(); readData = new ReadDataShare(this); service = this; foregroundServiceStarter = new ForegroundServiceStarter(getApplicationContext(), service); foregroundServiceStarter.start(); final IntentFilter bondintent = new IntentFilter(BluetoothDevice.ACTION_BOND_STATE_CHANGED); registerReceiver(mPairReceiver, bondintent); prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); listenForChangeInSettings(); //bgToSpeech = BgToSpeech.setupTTS(getApplicationContext()); //keep reference to not being garbage collected instance = JoH.ts(); }
public void onSharedPreferenceChanged(SharedPreferences prefs, String key) { if (key.compareTo("run_service_in_foreground") == 0) { UserError.Log.d("FOREGROUND", "run_service_in_foreground changed!"); if (prefs.getBoolean("run_service_in_foreground", false)) { foregroundServiceStarter = new ForegroundServiceStarter(getApplicationContext(), dexCollectionService); foregroundServiceStarter.start(); UserError.Log.d(TAG, "Moving to foreground"); } else { dexCollectionService.stopForeground(true); UserError.Log.d(TAG, "Removing from foreground"); } } } };
public void onSharedPreferenceChanged(SharedPreferences prefs, String key) { if (key.compareTo("run_service_in_foreground") == 0) { Log.d("FOREGROUND", "run_service_in_foreground changed!"); if (prefs.getBoolean("run_service_in_foreground", false)) { foregroundServiceStarter = new ForegroundServiceStarter(getApplicationContext(), dexCollectionService); foregroundServiceStarter.start(); Log.d(TAG, "Moving to foreground"); } else { dexCollectionService.stopForeground(true); Log.d(TAG, "Removing from foreground"); } } if (key.equals("dex_collection_method") || key.equals("dex_txid")) { //if the input method or ID changed, accept any new package once even if they seem duplicates Log.d(TAG, "collection method or txID changed - setting lastdata to null"); lastdata = null; } } };
public void onSharedPreferenceChanged(SharedPreferences prefs, String key) { if (key.compareTo("run_service_in_foreground") == 0) { Log.d("FOREGROUND", "run_service_in_foreground changed!"); if (prefs.getBoolean("run_service_in_foreground", false)) { foregroundServiceStarter = new ForegroundServiceStarter(getApplicationContext(), dexCollectionService); foregroundServiceStarter.start(); Log.d(TAG, "Moving to foreground"); } else { dexCollectionService.stopForeground(true); Log.d(TAG, "Removing from foreground"); } } } };
public void onSharedPreferenceChanged(SharedPreferences prefs, String key) { if (key.compareTo("run_service_in_foreground") == 0) { Log.d("FOREGROUND", "run_service_in_foreground changed!"); if (prefs.getBoolean("run_service_in_foreground", false)) { foregroundServiceStarter = new ForegroundServiceStarter(getApplicationContext(), dexCollectionService); foregroundServiceStarter.start(); Log.d(TAG, "Moving to foreground"); } else { dexCollectionService.stopForeground(true); Log.d(TAG, "Removing from foreground"); } } } };
public void onSharedPreferenceChanged(SharedPreferences prefs, String key) { if (key.compareTo("run_service_in_foreground") == 0) { UserError.Log.d("FOREGROUND", "run_service_in_foreground changed!"); if (prefs.getBoolean("run_service_in_foreground", false)) { foregroundServiceStarter = new ForegroundServiceStarter(getApplicationContext(), dexCollectionService); foregroundServiceStarter.start(); UserError.Log.d(TAG, "Moving to foreground"); } else { dexCollectionService.stopForeground(true); UserError.Log.d(TAG, "Removing from foreground"); } } } };
@Override public void onCreate() { foregroundServiceStarter = new ForegroundServiceStarter(getApplicationContext(), this); foregroundServiceStarter.start(); //mContext = getApplicationContext(); dexCollectionService = this; prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); listenForChangeInSettings(); // bgToSpeech = BgToSpeech.setupTTS(mContext); //keep reference to not being garbage collected Log.i(TAG, "onCreate: STARTING SERVICE"); lastState = "Starting up " + JoH.hourMinuteString(); }
@Override public void onCreate() { foregroundServiceStarter = new ForegroundServiceStarter(getApplicationContext(), this); foregroundServiceStarter.start(); //mContext = getApplicationContext(); dexCollectionService = this; prefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); listenForChangeInSettings(); // bgToSpeech = BgToSpeech.setupTTS(mContext); //keep reference to not being garbage collected Log.i(TAG, "onCreate: STARTING SERVICE"); lastState = "Starting up " + JoH.hourMinuteString(); }