如何使用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!
请参见第4节,使用相机API
See section 4 using the Camera API