本文整理汇总了Java中com.karumi.dexter.Dexter.isRequestOngoing方法的典型用法代码示例。如果您正苦于以下问题:Java Dexter.isRequestOngoing方法的具体用法?Java Dexter.isRequestOngoing怎么用?Java Dexter.isRequestOngoing使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.karumi.dexter.Dexter
的用法示例。
在下文中一共展示了Dexter.isRequestOngoing方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onViewCreated
import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
AnalyticsManager.getInstance().trackContentView("Map");
mParties = getResources().getStringArray(R.array.states_values);
setHasOptionsMenu(true);
createPermissionListeners();
initManagers();
initMap(savedInstanceState);
if (Dexter.isRequestOngoing()) {
return;
}
Dexter.checkPermission(locationPermissionListener, Manifest.permission.ACCESS_COARSE_LOCATION);
idStation = getArguments().getString(HomeActivity.STATION_ID);
}
示例2: onFabButtonClicked
import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
@OnClick(R.id.fab)
public void onFabButtonClicked() {
AnalyticsManager.getInstance().trackSendIncidence();
if (Dexter.isRequestOngoing()) {
return;
}
Dexter.checkPermissions(cameraPermissionListener, Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.CAMERA);
}
示例3: takePictureViaIntent
import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
private void takePictureViaIntent() {
if (Dexter.isRequestOngoing()) {
return;
}
CompositeMultiplePermissionsListener listener = new CompositeMultiplePermissionsListener(permissionListener, anyPermissionDeniedListener);
Dexter.checkPermissions(listener, Manifest.permission.CAMERA, Manifest.permission.WRITE_EXTERNAL_STORAGE);
}
示例4: onMissingPermEvent
import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
/**
* Called when something has indicated that we are missing a permission that we need.
* @param event {@link MissingPermEvent}.
*/
@Subscribe
public final void onMissingPermEvent(MissingPermEvent event) {
// Make sure we don't start another request if one is already happening.
if (!Dexter.isRequestOngoing()) {
// If the nag snackbar is shown, get rid of it first.
SnackKiosk.dismissIfActionId(R.id.sb_action_retry_perms_check);
// Store the ID of the action we wish to take if the permission is granted.
onGrantedActionId = event.getActionId();
// Currently we only have one permission we'd need to check for, write external storage, so we don't bother
// checking the permission string in the event.
Dexter.checkPermission(storagePL, Manifest.permission.WRITE_EXTERNAL_STORAGE);
}
}
示例5: onAllPermissionsButtonClicked
import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
@OnClick(R.id.all_permissions_button) public void onAllPermissionsButtonClicked() {
if (Dexter.isRequestOngoing()) {
return;
}
Dexter.checkPermissions(allPermissionsListener, Manifest.permission.CAMERA,
Manifest.permission.READ_CONTACTS, Manifest.permission.RECORD_AUDIO);
}
示例6: onCameraPermissionButtonClicked
import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
@OnClick(R.id.camera_permission_button) public void onCameraPermissionButtonClicked() {
if (Dexter.isRequestOngoing()) {
return;
}
new Thread(new Runnable() {
@Override public void run() {
Dexter.checkPermissionOnSameThread(cameraPermissionListener, Manifest.permission.CAMERA);
}
}).start();
}
示例7: askForPermission
import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
@Override public void askForPermission(Permission permission,
UserPermissionRequestResponseListener userResponse, Activity activity) {
if (Dexter.isRequestOngoing()) {
return;
}
PermissionListener[] listeners = createListeners(permission, userResponse, activity);
Dexter.checkPermission(new CompositePermissionListener(listeners),
permission.getAndroidPermissionStringType());
}
示例8: askForPermission
import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
@Override public void askForPermission(Permission permission,
UserPermissionRequestResponseListener userResponse, Activity activity) {
if (Dexter.isRequestOngoing()) {
return;
}
PermissionListener[] listeners = createListeners(permission, userResponse, activity);
Dexter.checkPermission(new CompositePermissionListener(listeners),
permission.getAndroidPermissionStringType());
}
示例9: onContactsPermissionButtonClicked
import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
@OnClick(R.id.contacts_permission_button) public void onContactsPermissionButtonClicked() {
if (Dexter.isRequestOngoing()) {
return;
}
Dexter.checkPermission(contactsPermissionListener, Manifest.permission.READ_CONTACTS);
}
示例10: onAudioPermissionButtonClicked
import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
@OnClick(R.id.audio_permission_button) public void onAudioPermissionButtonClicked() {
if (Dexter.isRequestOngoing()) {
return;
}
Dexter.checkPermission(audioPermissionListener, Manifest.permission.RECORD_AUDIO);
}
示例11: showPikerGallery
import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
protected void showPikerGallery(int responseCode) {
if (!Dexter.isRequestOngoing()) {
RESPONSE_CODE_TO_IMAGE = responseCode;
checkPermissionGalleryAndCamera();
}
}