在后台Android摄像头 [英] android camera in background

查看:205
本文介绍了在后台Android摄像头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发一个应用程序,才能从后台应用程序的图像说采用了android的服务。我不希望任何用户交互来获取图像,它应该完全从后台工作。

I am developing an application to take images from background application say using android service. i don't want any user interaction to takes images, it should completely work from background.

我已经尝试 -

  1. 调用相机业务 - 它并不总是工作一段时间的工作,如果我们有虚拟surfaceview,如果再Android的关闭相关的活动服务停止征收的图片,我不想跑活动的用户交互。 有一些改变它工作正常,但所有图像都是黑色的。
  2. 控件:没有得到如何调用摄像头部件的窗口小部件不支持surfaceview
  3. 动态壁纸:不能使它工作到现在,是否支持相机
  1. Calling camera from service - It not always works sometime works if we have dummy surfaceview, again if Android close the related activity service stopped takings pics, I don't want to run activity for user interaction. with some changes it working fine but all images are black.
  2. Widget: Not getting how to call camera in widget as widget doesn't support surfaceview.
  3. Live wallpaper: not able to make it work till now, does it supports for camera?

根据我的经验,到现在为止Android摄像头的服务不是为了需要的画面,如果没有真正的preVIEW可用。

As per my experience till now Android camera service not designed to takes picture if no real preview available.

有没有人开发出这样的事?任何帮助将是非常美联社preciate。

Is anyone developed something like this? any help will be really appreciate.

推荐答案

如果你可以忽略旧版本中,它可能会更易于使用的表面纹理(API 11及更高版本)由于 vikky。 RK <一个href="http://stackoverflow.com/questions/11544877/really-confused-with-set$p$pviewcallback-in-android-need-advice">notes在回答一个最近的问题,介绍了该技术可以在<一个被发现href="http://grep$c$c.com/file/repository.grep$c$c.com/java/ext/com.google.android/android-apps/4.0.1_r1/com/android/camera/panorama/PanoramaActivity.java"相对=nofollow>默认的Andr​​oid摄像头的PanoramaActivity code 的应用程序。

If you can ignore older versions, it may be easier to use SurfaceTexture (API 11 and higher) As vikky.rk notes in an answer to a recent question, an introduction to this technique can be found in the PanoramaActivity code of the default Android Camera App.

这篇关于在后台Android摄像头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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