当前位置: 首页>>代码示例>>Java>>正文


Java Dexter.isRequestOngoing方法代码示例

本文整理汇总了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);
}
 
开发者ID:Mun0n,项目名称:MADBike,代码行数:16,代码来源:MapFragment.java

示例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);
}
 
开发者ID:Mun0n,项目名称:MADBike,代码行数:9,代码来源:MapFragment.java

示例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);
}
 
开发者ID:fzymek,项目名称:FunWithAndroid,代码行数:8,代码来源:MainActivity.java

示例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);
    }
}
 
开发者ID:bkromhout,项目名称:Minerva,代码行数:18,代码来源:PermCheckingActivity.java

示例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);
}
 
开发者ID:longtaoge,项目名称:Dexter,代码行数:8,代码来源:SampleActivity.java

示例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();
}
 
开发者ID:longtaoge,项目名称:Dexter,代码行数:11,代码来源:SampleActivity.java

示例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());

}
 
开发者ID:Gigigo-Android-Devs,项目名称:gigigo-utils-suite,代码行数:13,代码来源:AndroidPermissionCheckerImpl.java

示例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());
}
 
开发者ID:applivery,项目名称:applivery-android-sdk,代码行数:12,代码来源:AndroidPermissionCheckerImpl.java

示例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);
}
 
开发者ID:longtaoge,项目名称:Dexter,代码行数:7,代码来源:SampleActivity.java

示例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);
}
 
开发者ID:longtaoge,项目名称:Dexter,代码行数:7,代码来源:SampleActivity.java

示例11: showPikerGallery

import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
protected void showPikerGallery(int responseCode) {
    if (!Dexter.isRequestOngoing()) {
        RESPONSE_CODE_TO_IMAGE = responseCode;
        checkPermissionGalleryAndCamera();
    }
}
 
开发者ID:scott7462,项目名称:Udacity-Capstone-Project,代码行数:7,代码来源:BasePickImageFragment.java


注:本文中的com.karumi.dexter.Dexter.isRequestOngoing方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。