我们如何更改Android M权限请求对话屏幕的文本?

时间:2015-08-05 10:53:27

标签: android android-permissions

if(checkSelfPermission(Manifest.permission.CAMERA)!=PackageManager.PERMISSION_GRANTED) {
// Permission has not been granted and must be requested.
if (shouldShowRequestPermissionRationale(Manifest.permission.CAMERA)) {
    Toast.makeText(this, "Camera access is required to display a camera preview.",Toast.LENGTH_SHORT).show();

//我想在此处更改提示消息,而不是提供Toast消息  消息可以解释为什么需要许可     } }

0 个答案:

没有答案