permissions.dispatcher.PermissionUtils Java Examples
The following examples show how to use
permissions.dispatcher.PermissionUtils.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MainActivity.java From GSYVideoPlayer with Apache License 2.0 | 5 votes |
@Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { super.onRequestPermissionsResult(requestCode, permissions, grantResults); boolean sdPermissionResult = PermissionUtils.verifyPermissions(grantResults); if (!sdPermissionResult) { Toast.makeText(this, "没获取到sd卡权限,无法播放本地视频哦", Toast.LENGTH_LONG).show(); } }
Example #2
Source File: SimpleActivity.java From GSYVideoPlayer with Apache License 2.0 | 5 votes |
@Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { super.onRequestPermissionsResult(requestCode, permissions, grantResults); boolean sdPermissionResult = PermissionUtils.verifyPermissions(grantResults); if (!sdPermissionResult) { Toast.makeText(this, "没获取到sd卡权限,无法播放本地视频哦", Toast.LENGTH_LONG).show(); } }
Example #3
Source File: MainActivity.java From GSYRecordWave with Apache License 2.0 | 5 votes |
@Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { super.onRequestPermissionsResult(requestCode, permissions, grantResults); boolean sdPermissionResult = PermissionUtils.verifyPermissions(grantResults); if (!sdPermissionResult) { Toast.makeText(this, "没获取到sd卡和录音权限,无法正常运行哦", Toast.LENGTH_LONG).show(); } }
Example #4
Source File: MainActivity.java From AndroidBleManager with Apache License 2.0 | 5 votes |
/** * 检查权限 * @return */ public boolean checkPermission(){ if (Build.VERSION.SDK_INT >= 23){ boolean hasPermission = PermissionUtils.hasSelfPermissions(this, permissionList); MainActivityPermissionsDispatcher.showCheckPermissionStateWithCheck(this); if (!LocationUtils.isGpsProviderEnabled(this)){ return false; } return hasPermission; } return true; }