Search in sources :

Example 6 with SyncthingService

use of com.nutomic.syncthingandroid.service.SyncthingService in project syncthing-android by syncthing.

the class DeviceActivity method onServiceConnected.

private void onServiceConnected() {
    Log.v(TAG, "onServiceConnected");
    SyncthingService syncthingService = (SyncthingService) getService();
    syncthingService.getNotificationHandler().cancelConsentNotification(getIntent().getIntExtra(EXTRA_NOTIFICATION_ID, 0));
    syncthingService.registerOnServiceStateChangeListener(this::onServiceStateChange);
}
Also used : SyncthingService(com.nutomic.syncthingandroid.service.SyncthingService)

Example 7 with SyncthingService

use of com.nutomic.syncthingandroid.service.SyncthingService in project syncthing-android by syncthing.

the class FolderActivity method onDestroy.

@Override
public void onDestroy() {
    super.onDestroy();
    SyncthingService syncthingService = getService();
    if (syncthingService != null) {
        syncthingService.getNotificationHandler().cancelConsentNotification(getIntent().getIntExtra(EXTRA_NOTIFICATION_ID, 0));
        syncthingService.unregisterOnServiceStateChangeListener(this::onServiceStateChange);
    }
    mLabelView.removeTextChangedListener(mTextWatcher);
    mIdView.removeTextChangedListener(mTextWatcher);
}
Also used : SyncthingService(com.nutomic.syncthingandroid.service.SyncthingService)

Example 8 with SyncthingService

use of com.nutomic.syncthingandroid.service.SyncthingService in project syncthing-android by syncthing.

the class FolderPickerActivity method onDestroy.

@Override
protected void onDestroy() {
    super.onDestroy();
    SyncthingService syncthingService = getService();
    if (syncthingService != null) {
        syncthingService.unregisterOnServiceStateChangeListener(this::onServiceStateChange);
    }
}
Also used : SyncthingService(com.nutomic.syncthingandroid.service.SyncthingService)

Example 9 with SyncthingService

use of com.nutomic.syncthingandroid.service.SyncthingService in project syncthing-android by syncthing.

the class WebGuiActivity method onDestroy.

@Override
protected void onDestroy() {
    SyncthingService mSyncthingService = getService();
    if (mSyncthingService != null) {
        mSyncthingService.unregisterOnServiceStateChangeListener(this);
    }
    mWebView.destroy();
    mWebView = null;
    super.onDestroy();
}
Also used : SyncthingService(com.nutomic.syncthingandroid.service.SyncthingService)

Aggregations

SyncthingService (com.nutomic.syncthingandroid.service.SyncthingService)9 Intent (android.content.Intent)1 SyncthingServiceBinder (com.nutomic.syncthingandroid.service.SyncthingServiceBinder)1