jingmaolin / myruntimepermission Goto Github PK
View Code? Open in Web Editor NEWdeal with running time permissions
deal with running time permissions
运行时权限处理: 对于一些危险权限,在6.0以下的系统中,只要在AndroidManifest中注册了则可以正常运行; 但针对Android6.0以上的版本,只在AndroidManifest中注册仍会崩溃, 其还需要在运行时进行权限处理。 重点: ①检查某一项权限是否授权 ContextCompat.checkSelfPermission() ②请求未授权的权限(可同时请求多个权限)(每一子项都不能为空!!!,否则不会弹出系统框) ActivityCompat.requestPermissions() ③ActivityCompat.shouldShowRequestPermissionRationale 返回值 true: 第一次拒绝(未勾选不再提示)且后续再次判断时 返回值 false:第一次判断;勾选不在提示框并拒绝后,再次判断 ④生命周期流转(注:请求不一定要放在onClick中) onCrete->onStart->onResume->onclick->onPause->onResume ⑤待理解: AppOpsManagerCompat AppOpsManager ⑥华为手机位置信息关闭后的定位处理 备注:查看手机危险权限命令行 adb shell pm list permissions -d -g
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.