Android相机和照片选择器的意图 [英] Android camera and photo picker intent

查看:131
本文介绍了Android相机和照片选择器的意图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个android应用程序,其功能之一是从图库或照相机中拍摄照片.我在使其与所有设备一起使用时遇到问题.我找不到每个Android版本和每个设备的正确解决方案.我觉得我已经遍及整个Internet并尝试了所有找到的代码,但是没有成功使它适用于所有提到的代码.我试过实现从官方的android文档代码,但同样的问题.从画廊中挑选东西似乎很有效,但相机根本无法正常工作.有人可以给我提示,链接或代码怎么做?我确实不敢尝试这样做.我是android的新手...

I'm building the android app which one of the functionality will be taking the picture from the gallery or from the camera. I have a problem making it to work with every device. I can't find the proper solution for every android version and every device. I feel like I've searched all over the internet and tried every code that I found but without success to make it work for everything mentioned. I've tried implementing the code from the official android documentation but same problem. Picking from the gallery seem's to be working, but camera doesn't work well at all. Could someone please give me the tip, link or the code how to do it? I literally lost my nerves trying to make this. I'm pretty new in android...

我需要画廊和摄影机这两个意图.

推荐答案

将近半年后,我找到了解决方案.实际上,我发现了一个适用于每个手机和每个android版本的库.如果仍然有人需要解决方案,这是一个答案.

After almost half of a year, I found a solution. Actually, I found a library which works with every phone and every android version. If still someone needs a solution for this, here is an answer.

EasyImage 做到了!

这篇关于Android相机和照片选择器的意图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆