如何使用Android在没有用户交互的情况下从相机捕获图像 [英] How to capture image from camera without user interaction using android

查看:58
本文介绍了如何使用Android在没有用户交互的情况下从相机捕获图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个应用程序,它将在启动应用程序时自动捕获图像并将其存储在SD卡中。 (即)在应用程序初始化后没有任何用户交互。我听说使用Intent可以拍照,但需要用户交互。因此我使用了相机类。但这没有用。我遇到了各种各样的帖子,但似乎没什么用。
有人可以给我一个建议吗?

I am developing an application which will capture the image automatically and store it in SD card when the application is started. (i.e) without any user interaction after the initialization of the application. I hear that using intent we can take pictures but user interaction is necessary.So i used camera classes. But it was not working. I came across various posts but nothing seems to be useful. Can any one give me a suggestion?

推荐答案

您可以阅读以下教程,它将为您服务目的。我有一个类似的要求,我使用此代码可以很好地工作!

You can go through through the following tutorial and it will serve your purpose. I had a similar requirement and i used this code its working nicely!

相机API

请参见第4节,使用相机API

See section 4 using the Camera API

这篇关于如何使用Android在没有用户交互的情况下从相机捕获图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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