【发布时间】:2016-01-08 16:05:48
【问题描述】:
我正在寻找一种无需用户交互即可在 android 中自动拍照的方法,我可以打开并拍照但无法自动拍照?
public void capturePhoto() {
Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(G.DIR_APP + "/tmp")));
startActivityForResult(intent, TAKE_PICTURE);
}
【问题讨论】:
-
在没有用户交互(没有用户操作)的情况下捕获图像并使用android服务在后台捕获图像chandandroid.blogspot.in/2014/04/…