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


Java Dexter.continuePendingRequestsIfPossible方法代码示例

本文整理汇总了Java中com.karumi.dexter.Dexter.continuePendingRequestsIfPossible方法的典型用法代码示例。如果您正苦于以下问题:Java Dexter.continuePendingRequestsIfPossible方法的具体用法?Java Dexter.continuePendingRequestsIfPossible怎么用?Java Dexter.continuePendingRequestsIfPossible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.karumi.dexter.Dexter的用法示例。


在下文中一共展示了Dexter.continuePendingRequestsIfPossible方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: configureDexterListeners

import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
private void configureDexterListeners() {
    permissionListener = new MultiplePermissionsListener() {
        @Override
        public void onPermissionsChecked(MultiplePermissionsReport report) {
            Timber.d("Accepted: %s", report.getGrantedPermissionResponses());
            Timber.d("Denied: %s", report.getDeniedPermissionResponses());

            if (report.areAllPermissionsGranted()) {
                Timber.d("All granted, requesting");
                requestPicture();
            }
        }

        @Override
        public void onPermissionRationaleShouldBeShown(List<PermissionRequest> permissions, PermissionToken token) {
            Timber.d("should show rationale");
            token.continuePermissionRequest();
        }
    };
    anyPermissionDeniedListener = DialogOnAnyDeniedMultiplePermissionsListener.Builder
            .withContext(this)
            .withTitle("Camera & file permissions")
            .withMessage("Camera & file permissions are needed for saving pictures")
            .withButtonText("Ok")
            .build();
    Dexter.continuePendingRequestsIfPossible(anyPermissionDeniedListener);
}
 
开发者ID:fzymek,项目名称:FunWithAndroid,代码行数:28,代码来源:MainActivity.java

示例2: onCreate

import com.karumi.dexter.Dexter; //导入方法依赖的package包/类
@Override protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.sample_activity);
  ButterKnife.bind(this);
  createPermissionListeners();
  /*
   * If during the rotate screen process the activity has been restarted you can call this method
   * to start with the check permission process without keep in an Android Bundle the state of
   * the request permission process.
   */
  Dexter.continuePendingRequestsIfPossible(allPermissionsListener);
}
 
开发者ID:longtaoge,项目名称:Dexter,代码行数:13,代码来源:SampleActivity.java


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