use of com.owncloud.android.ui.dialog.LoadingDialog in project android by owncloud.
the class AuthenticatorActivity method getOAuth2AccessTokenFromCapturedRedirection.
/**
* Parses the redirection with the response to the GET AUTHORIZATION request to the
* oAuth server and requests for the access token (GET ACCESS TOKEN)
*/
private void getOAuth2AccessTokenFromCapturedRedirection() {
/// Parse data from OAuth redirection
String queryParameters = mNewCapturedUriFromOAuth2Redirection.getQuery();
mNewCapturedUriFromOAuth2Redirection = null;
/// Showing the dialog with instructions for the user.
LoadingDialog dialog = LoadingDialog.newInstance(R.string.auth_getting_authorization, true);
dialog.show(getSupportFragmentManager(), WAIT_DIALOG_TAG);
/// GET ACCESS TOKEN to the oAuth server
Intent getServerInfoIntent = new Intent();
getServerInfoIntent.setAction(OperationsService.ACTION_OAUTH2_GET_ACCESS_TOKEN);
getServerInfoIntent.putExtra(OperationsService.EXTRA_SERVER_URL, mOAuthTokenEndpointText.getText().toString().trim());
getServerInfoIntent.putExtra(OperationsService.EXTRA_OAUTH2_QUERY_PARAMETERS, queryParameters);
if (mOperationsServiceBinder != null) {
//Log_OC.e(TAG, "getting access token..." );
mWaitingForOpId = mOperationsServiceBinder.queueNewOperation(getServerInfoIntent);
}
}
use of com.owncloud.android.ui.dialog.LoadingDialog in project android by owncloud.
the class FileActivity method dismissLoadingDialog.
/**
* Dismiss loading dialog
*/
public void dismissLoadingDialog() {
Fragment frag = getSupportFragmentManager().findFragmentByTag(DIALOG_WAIT_TAG);
if (frag != null) {
Log_OC.d(TAG, "dismiss loading dialog");
LoadingDialog loading = (LoadingDialog) frag;
loading.dismiss();
}
}
use of com.owncloud.android.ui.dialog.LoadingDialog in project android by owncloud.
the class FileActivity method showLoadingDialog.
/**
* Show loading dialog
*/
public void showLoadingDialog(int messageId) {
// grant that only one waiting dialog is shown
dismissLoadingDialog();
// Construct dialog
Fragment frag = getSupportFragmentManager().findFragmentByTag(DIALOG_WAIT_TAG);
if (frag == null) {
Log_OC.d(TAG, "show loading dialog");
LoadingDialog loading = LoadingDialog.newInstance(messageId, false);
FragmentManager fm = getSupportFragmentManager();
FragmentTransaction ft = fm.beginTransaction();
loading.show(ft, DIALOG_WAIT_TAG);
fm.executePendingTransactions();
}
}
use of com.owncloud.android.ui.dialog.LoadingDialog in project android by owncloud.
the class LogHistoryActivity method showLoadingDialog.
/**
* Show loading dialog
*/
public void showLoadingDialog() {
// Construct dialog
LoadingDialog loading = LoadingDialog.newInstance(R.string.log_progress_dialog_text, false);
FragmentManager fm = getSupportFragmentManager();
FragmentTransaction ft = fm.beginTransaction();
loading.show(ft, DIALOG_WAIT_TAG);
}
use of com.owncloud.android.ui.dialog.LoadingDialog in project android by nextcloud.
the class LogHistoryActivity method dismissLoadingDialog.
/**
* Dismiss loading dialog
*/
public void dismissLoadingDialog() {
Fragment frag = getSupportFragmentManager().findFragmentByTag(DIALOG_WAIT_TAG);
if (frag != null) {
LoadingDialog loading = (LoadingDialog) frag;
loading.dismissAllowingStateLoss();
}
}
Aggregations