private void setSettings() { Log.d(TAG, "setSettings enter"); pebble_integration = mPrefs.getBoolean("pebble_sync", false); processConnect(); if (wear_integration) { if (googleApiClient == null) googleApiConnect(); Log.d(TAG, "setSettings wear_sync changed to True."); sendPrefSettings(); } }
private void forceGoogleApiConnect() { if ((googleApiClient != null && !googleApiClient.isConnected() && !googleApiClient.isConnecting()) || googleApiClient == null) { try { Log.d(TAG, "forceGoogleApiConnect: forcing google api reconnection"); googleApiConnect(); Thread.sleep(2000); } catch (InterruptedException e) { Log.d(TAG, "forceGoogleApiConnect: exception:" + e); } } }
private void forceGoogleApiConnect() { if ((googleApiClient != null && !googleApiClient.isConnected() && !googleApiClient.isConnecting()) || googleApiClient == null) { try { Log.d(TAG, "forceGoogleApiConnect: forcing google api reconnection"); googleApiConnect(); Thread.sleep(2000); } catch (InterruptedException e) { Log.d(TAG, "forceGoogleApiConnect: exception:" + e); } } }
private void setSettings() { Log.d(TAG, "setSettings enter"); pebble_integration = mPrefs.getBoolean("pebble_sync", false); processConnect(); if (wear_integration) { if (googleApiClient == null) googleApiConnect(); Log.d(TAG, "setSettings wear_sync changed to True."); sendPrefSettings(); } }
@Override public void onCreate() { mPrefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); wear_integration = mPrefs.getBoolean("wear_sync", false); //is_using_g5 = (getDexCollectionType() == DexCollectionType.DexcomG5); is_using_bt = DexCollectionType.hasBluetooth(); if (wear_integration) { googleApiConnect(); } setSettings(); listenForChangeInSettings(); }
@Override public void onCreate() { mPrefs = PreferenceManager.getDefaultSharedPreferences(getApplicationContext()); wear_integration = mPrefs.getBoolean("wear_sync", false); //is_using_g5 = (getDexCollectionType() == DexCollectionType.DexcomG5); is_using_bt = DexCollectionType.hasBluetooth(); if (wear_integration) { googleApiConnect(); } setSettings(); listenForChangeInSettings(); }