我可以强制我的应用程序启动默认相机而不是提供“使用完成操作"列表吗? [英] Can I force my application to launch the default Camera rather than offering the 'Complete action using' list?

查看:10
本文介绍了我可以强制我的应用程序启动默认相机而不是提供“使用完成操作"列表吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用意图 new Intent(MediaStore.ACTION_IMAGE_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?

推荐答案

我不确定您要实现的目标是否可以在所有设备上移植.Android 的一个目标是允许轻松替换服务请求的活动,例如图像捕获.话虽如此,如果您只想为您的设备执行此操作,您可以简单地将意图中的组件名称设置为媒体捕获活动的名称.

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天全站免登陆