当前位置:网站首页>Privilege management of vivo mobile phone
Privilege management of vivo mobile phone
2022-06-28 12:12:00 【A cup of bitter mustard】
Recently, I encountered the problem of permission management in the project , Only Huawei and vivo, Therefore, only these two models are discussed here . A problem was found while debugging the code , As I wrote in my previous blog , It's discovery vivo I use it on my cell phone android Native api To check permissions ( Take camera permissions as an example ) It is found that you have this permission , But I am clearly setting up ( Relatively new vivo On the cell phone i The housekeeper and the permission management in the settings have been integrated into one set ) The permission is forbidden in ; It is normal on Huawei mobile phones , If it is forbidden, it will return -1( No authority ), Grant and return 0( Have permission ). original , In the relatively new vivo The default setting on the mobile phone is android The native rights management system hides , No matter what permissions you check , Will be returned to you 0( Have permission ), The real rights management system is in i In the housekeeper .
You're setting ( That is to say i The housekeeper , They have become one ) After prohibition , The code uses android The native permission check returns 0( Have permission ), Then there is no way to handle your own logic according to the return value ? Generally, there is no need to worry about this problem , Because when you really use this permission , If i The housekeeper finds that you don't have this permission , The permission management pop-up box will pop up automatically , Request this permission from you , This process is not managed by us , Completely by i Housekeeper automatically manages . Yes, of course , The program is designed to be compatible with other mobile phones , It still needs to be written according to the normal logical process .
original text :https://blog.csdn.net/aabbwoshishei/article/details/78895510
边栏推荐
- 【C语言】结构体嵌套二级指针的使用
- recent developments
- Connectionreseterror: [winerror 10054] the remote host forced an existing connection to be closed
- 自定义标题栏View
- [no title] the virtual machine vmnet0 cannot be found and an error is reported: there is no un bridged host network adapter
- Chendanqi, Fang Fei, guquanquan and Li Bo won the prize, and the list of Sloan research award in 2022 was released
- Vivo手机的权限管理
- Using soapUI to obtain freemaker's FTL file template
- ArrayList源码解析
- Is there a threshold for opening futures accounts? How to open futures accounts safely on the Internet
猜你喜欢

开源项目维权成功案例: spug 开源运维平台成功维权
Three ways to implement LRU cache (recommended Collection)

day31 js笔记 DOM下 2021.09.26

Oracle date format exception: invalid number

Software test interview classic + 1000 high-frequency real questions, and the hit rate of big companies is 80%

.NET混合开发解决方案24 WebView2对比CefSharp的超强优势

【C语言】关于scanf()与scanf_s()的一些问题

RemoteViews的作用及原理
Using MySQL database in the express framework of node

Day33 JS note event (Part 2) September 28, 2021
随机推荐
6. calculation index
2018 joint examination of nine provinces & Merging of line segment trees
Excel import / export convenience tool class
自定义标题栏View
【无标题】虚拟机vmnet0找不到且报错:没有未桥接的主机网络适配器
JNI函数的2种书写方式
【C语言】关于scanf()与scanf_s()的一些问题
Leetcode 48. 旋转图像(可以,已解决)
day30 js笔记 BOM和DOM 2021.09.24
【C语言】二叉树的实现及三种遍历
Day34 JS notes regular expression 2021.09.29
Which programming language will attract excellent talents?
fatal: unsafe repository (‘/home/anji/gopath/src/gateway‘ is owned by someone else)
Data analysis learning notes
Day37 JS note motion function 2021.10.11
fatal: unsafe repository (‘/home/anji/gopath/src/gateway‘ is owned by someone else)
Dongyuhui, New Oriental and Phoenix Satellite TV
Vivo手机的权限管理
day33 js笔记 事件(下)2021.09.28
The default point of this in JS and how to modify it to 2021.11.09