我可以强迫我的应用程序启动默认的摄像头,而不是提供列表中的“使用完整的行动”? [英] Can I force my application to launch the default Camera rather than offering the 'Complete action using' list?

查看:92
本文介绍了我可以强迫我的应用程序启动默认的摄像头,而不是提供列表中的“使用完整的行动”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的意图新意图(MediaStore.ACTION_IM​​AGE_CAPTURE); 以拍摄图像在我的应用程序中使用。我已经安装了设备上的两个应用程序可以执行这个功能,但希望我的应用程序只能使用默认的摄像头。

I'm using the intent new Intent(MediaStore.ACTION_IMAGE_CAPTURE); to capture an image for use in my application. I have two applications installed on my device that can perform this function but would like my app to only use the default camera.

是否有这样做的方法吗?

Is there a way of doing this?

推荐答案

我不知道你正在试图完成的任务是在所有设备便于携带。机器人中的一个目标是允许容易地更换的活动服务请求,如图像捕获。话虽这么说,如果你只是想做到这一点为您的设备,你可以简单地设置组件名称在意向向媒体捕捉活动的名称。

I'm not sure what you are trying to accomplish is portable across all devices. One goal of Android is to allow the easy replacement of activities that service requests such as image capture. That being said, if you only wish to do this for your device, you could simply set the component name in the intent to the media capture activity's name.

这篇关于我可以强迫我的应用程序启动默认的摄像头,而不是提供列表中的“使用完整的行动”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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