Search in sources :

Example 1 with SaveSharedUserStateTask

use of com.odysee.app.tasks.wallet.SaveSharedUserStateTask in project odysee-android by OdyseeTeam.

the class MainActivity method saveSharedUserState.

public void saveSharedUserState() {
    if (!userSyncEnabled()) {
        return;
    }
    SaveSharedUserStateTask saveTask = new SaveSharedUserStateTask(Lbryio.AUTH_TOKEN, this, new SaveSharedUserStateTask.SaveSharedUserStateHandler() {

        @Override
        public void onSuccess() {
            // push wallet sync changes
            pushCurrentWalletSync();
        }

        @Override
        public void onError(Exception error) {
        // pass
        }
    });
    saveTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
Also used : SaveSharedUserStateTask(com.odysee.app.tasks.wallet.SaveSharedUserStateTask) JSONException(org.json.JSONException) LbryUriException(com.odysee.app.exceptions.LbryUriException) ExecutionException(java.util.concurrent.ExecutionException) SQLiteException(android.database.sqlite.SQLiteException) LbryioRequestException(com.odysee.app.exceptions.LbryioRequestException) LbryioResponseException(com.odysee.app.exceptions.LbryioResponseException) ApiCallException(com.odysee.app.exceptions.ApiCallException) AuthTokenInvalidatedException(com.odysee.app.exceptions.AuthTokenInvalidatedException) ParseException(java.text.ParseException)

Aggregations

SQLiteException (android.database.sqlite.SQLiteException)1 ApiCallException (com.odysee.app.exceptions.ApiCallException)1 AuthTokenInvalidatedException (com.odysee.app.exceptions.AuthTokenInvalidatedException)1 LbryUriException (com.odysee.app.exceptions.LbryUriException)1 LbryioRequestException (com.odysee.app.exceptions.LbryioRequestException)1 LbryioResponseException (com.odysee.app.exceptions.LbryioResponseException)1 SaveSharedUserStateTask (com.odysee.app.tasks.wallet.SaveSharedUserStateTask)1 ParseException (java.text.ParseException)1 ExecutionException (java.util.concurrent.ExecutionException)1 JSONException (org.json.JSONException)1