Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议适配一下Android7.0哦 #139

Open
bby0856 opened this issue Aug 18, 2017 · 4 comments
Open

建议适配一下Android7.0哦 #139

bby0856 opened this issue Aug 18, 2017 · 4 comments

Comments

@bby0856
Copy link

bby0856 commented Aug 18, 2017

No description provided.

@gdky005
Copy link

gdky005 commented Jan 8, 2018

来一个简单粗暴的解决办法:

http://blog.csdn.net/huangxiaoguo1/article/details/52830015?locationNum=2&fps=1

在Application的onCreat()方法中添加以下代码:

       // android 7.0系统解决拍照的问题
        StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
        StrictMode.setVmPolicy(builder.build());
        builder.detectFileUriExposure(); 

@HouChengYue
Copy link

HouChengYue commented Mar 20, 2018

大概知道应该是这样调用相机,但是在哪里更改呢? 还是你最后使用的代码最牛,不会有问题了!

@iamupgirl
Copy link

@shlockfan
Copy link

@gdky005 你这种适配方法有问题,还是老实配置FileProvider吧,因为用了detectFileUriExposure()以为就不用配置FileProvider了,结果到了安卓10上应用更新因为沙盒机制的原因会闪退 ,就是这个文章里的问题https://www.dazhuanlan.com/2019/10/23/5db01b9798489/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants