java android权限+标志“没有更多节目”

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了java android权限+标志“没有更多节目”相关的知识,希望对你有一定的参考价值。

if (grantResults.length > 0){
    if(grantResults[0] == PackageManager.PERMISSION_GRANTED) {
        //Do the stuff that requires permission...
    }else if (grantResults[0] == PackageManager.PERMISSION_DENIED){
        // Should we show an explanation?
        if (ActivityCompat.shouldShowRequestPermissionRationale(context, Manifest.permission.WRITE_EXTERNAL_STORAGE)) {
            //Show permission explanation dialog...
        }else{
            //Never ask again selected, or device policy prohibits the app from having that permission.
            //So, disable that feature, or fall back to another situation...
        }
    }
}

以上是关于java android权限+标志“没有更多节目”的主要内容,如果未能解决你的问题,请参考以下文章