Karumi/Dexter

Library should provide proper message if permission declaration doesn't exist on AndroidManifest.xml

开放

#229 创建于 2019年1月25日

 (0 条评论) (1 个反应) (0 位负责人)Java (682 个派生)batch import
enhancementhelp wanted

仓库指标

星标
 (5,224 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Expected behaviour

If any permission has requested on the code but hasn't declared on the manifest. We should provide a proper message to declare permission on manifest

Actual behaviour

Not showing any message to declare in manifest

Steps to reproduce

Execute the code without declaring camera permission on the manifest.

     Dexter.withActivity(context)
            .withPermission(Manifest.permission.CAMERA)
            .withListener(object : PermissionListener {
                override fun onPermissionGranted(response: PermissionGrantedResponse) {
                }

                override fun onPermissionDenied(response: PermissionDeniedResponse) {
                }

                override fun onPermissionRationaleShouldBeShown(
                    permission: com.karumi.dexter.listener.PermissionRequest,
                    token: PermissionToken
                ) {
                }
            }).withErrorListener {

            }.check()

Version of the library

5.0.0

贡献者指南