當前位置: 首頁>>代碼示例>>Java>>正文


Java EasyPermissions.onRequestPermissionsResult方法代碼示例

本文整理匯總了Java中pub.devrel.easypermissions.EasyPermissions.onRequestPermissionsResult方法的典型用法代碼示例。如果您正苦於以下問題:Java EasyPermissions.onRequestPermissionsResult方法的具體用法?Java EasyPermissions.onRequestPermissionsResult怎麽用?Java EasyPermissions.onRequestPermissionsResult使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在pub.devrel.easypermissions.EasyPermissions的用法示例。


在下文中一共展示了EasyPermissions.onRequestPermissionsResult方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onRequestPermissionsResult

import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {

    switch (requestCode){
        case 1:
            if (grantResults.length>0 && grantResults[0]==PackageManager.PERMISSION_GRANTED){
                openAlbum();
            }else {
                Toast.makeText(UIUtils.getContext(),"你關閉了權限功能",Toast.LENGTH_SHORT).show();
            }
            break;

        default:
            break;
    }

    super.onRequestPermissionsResult(requestCode, permissions, grantResults);

    // Forward results to EasyPermissions
    EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
}
 
開發者ID:android-jian,項目名稱:topnews,代碼行數:22,代碼來源:SettingFragment.java

示例2: onRequestPermissionsResult

import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
    super.onRequestPermissionsResult(requestCode, permissions, grantResults);

    // Forward results to EasyPermissions
    EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
}
 
開發者ID:xm0625,項目名稱:VBrowser-Android,代碼行數:8,代碼來源:MainActivity.java

示例3: onRequestPermissionsResult

import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
/**
 * EsayPermissions接管權限處理邏輯
 * @param requestCode
 * @param permissions
 * @param grantResults
 */
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
    super.onRequestPermissionsResult(requestCode, permissions, grantResults);

    // Forward results to EasyPermissions
    EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
}
 
開發者ID:RuanXiaoHui,項目名稱:ZxingScan,代碼行數:14,代碼來源:MainActivity.java

示例4: onRequestPermissionsResult

import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
    super.onRequestPermissionsResult(requestCode, permissions, grantResults);

    // EasyPermissions handles the request result.
    EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
}
 
開發者ID:coding-dream,項目名稱:TPlayer,代碼行數:8,代碼來源:CaptureActivity.java

示例5: onRequestPermissionsResult

import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
    super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
}
 
開發者ID:hsj-xiaokang,項目名稱:OSchina_resources_android,代碼行數:6,代碼來源:InvitationActivity.java

示例6: onRequestPermissionsResult

import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
    EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
}
 
開發者ID:weiwenqiang,項目名稱:GitHub,代碼行數:5,代碼來源:BaseActivity.java

示例7: onRequestPermissionsResult

import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
    EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
}
 
開發者ID:JackChan1999,項目名稱:letv,代碼行數:4,代碼來源:LetvBaseActivity.java

示例8: onRequestPermissionsResult

import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
    super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
}
 
開發者ID:CodingCodersCode,項目名稱:EvolvingNetLib,代碼行數:6,代碼來源:UploadRequestActivity.java

示例9: onRequestPermissionsResult

import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
    EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
}
 
開發者ID:hsj-xiaokang,項目名稱:OSchina_resources_android,代碼行數:5,代碼來源:SettingsFragment.java

示例10: onRequestPermissionsResult

import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
    super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    // Forward results to EasyPermissions
    EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
}
 
開發者ID:CommonsLab,項目名稱:CommonsLab,代碼行數:7,代碼來源:MainActivity.java

示例11: onRequestPermissionsResult

import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
/**
 * Respond to requests for permissions at runtime for API 23 and above.
 *
 * @param requestCode  The request code passed in
 *                     requestPermissions(android.app.Activity, String, int, String[])
 * @param permissions  The requested permissions. Never null.
 * @param grantResults The grant results for the corresponding permissions
 *                     which is either PERMISSION_GRANTED or PERMISSION_DENIED. Never null.
 */
@Override
public void onRequestPermissionsResult(int requestCode,
                                       @NonNull String[] permissions,
                                       @NonNull int[] grantResults) {
    super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    EasyPermissions.onRequestPermissionsResult(
            requestCode, permissions, grantResults, this);
}
 
開發者ID:webianks,項目名稱:Crimson,代碼行數:18,代碼來源:CheckupReminders.java

示例12: onRequestPermissionsResult

import pub.devrel.easypermissions.EasyPermissions; //導入方法依賴的package包/類
/**
 * Respond to requests for permissions at runtime for API 23 and above.
 *
 * @param requestCode  The request code passed in
 *                     requestPermissions(android.app.Activity, String, int, String[])
 * @param permissions  The requested permissions. Never null.
 * @param grantResults The grant results for the corresponding permissions
 *                     which is either PERMISSION_GRANTED or PERMISSION_DENIED. Never null.
 */
@Override
public void onRequestPermissionsResult(int requestCode,
                                       @NonNull String[] permissions,
                                       @NonNull int[] grantResults) {
    context.onRequestPermissionsResult(requestCode, permissions, grantResults);
    EasyPermissions.onRequestPermissionsResult(
            requestCode, permissions, grantResults, this);
}
 
開發者ID:Pl4gue,項目名稱:homeworkManager-android,代碼行數:18,代碼來源:AddHomeworkPresenter.java


注:本文中的pub.devrel.easypermissions.EasyPermissions.onRequestPermissionsResult方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。