@Override public void onTaskComplete(ApiBase result) { ApiBase response; try { response = (ApiBase) ApiResponseUtil.parseResponse(result, ApiBase.class); if (response != null) { dialog.hide(); } } catch (ApiException e) { return; } Log.i("Cat", "toot success, smells bad"); }
@Override public void onTaskComplete(ApiBase result) { dialog.hide(); User response; try { response = (User) ApiResponseUtil.parseResponse(result, User.class); if (response != null) { Toast.makeText(context, R.string.remove_success, Toast.LENGTH_SHORT).show(); Intent intent = new Intent(context, MainActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent); } } catch (ApiException e) { return; } }