qingmei2 / RxImagePicker

:rocket:RxJava2 and RxJava3 external support. Android flexible picture selector, provides the support for theme of Zhihu and WeChat (灵活的Android图片选择器,提供了知乎和微信主题的支持).
MIT License
1.2k stars 156 forks source link

相机权限问题 #99

Open keluokeda opened 3 years ago

keluokeda commented 3 years ago

如果app的清单配置文件里面声明了android.permission.CAMERA权限,那么在调用相机的时候需要申请相机权限,不然会报错

 java.lang.SecurityException: Permission Denial: starting Intent { act=android.media.action.IMAGE_CAPTURE flg=0x3 cmp=com.oppo.camera/.Camera clip={text/uri-list U:content://com.ke.rximagepicker.demo.image_picker.provider/external_files/Android/data/com.ke.rximagepicker.demo/files/Pictures/JPEG_20201218_095112_6286554076496488627.jpg} (has extras) mCallingUid=10216 } from ProcessRecord{388c884 16176:com.ke.rximagepicker.demo/u0a216} (pid=16176, uid=10216) with revoked permission android.permission.CAMERA
1ansam commented 2 years ago

可以使用郭神PermissionX解决方案 https://github.com/guolindev/PermissionX