How to use camera live feed as a activity background?

Varundroid picture Varundroid · Jul 12, 2013 · Viewed 22.5k times · Source

I am trying to make an App in which I need to use camera live feed as a background. (I know its a stupid thing to do but can't help, its a client demand).

I have tried doing it using SurfaceView but no success so far.

So far whatever I found on Stack Overflow are more of a guesses or directions how to do it but no real time examples or code help is out there. It would be great if someone who has done this before share a piece of code with Stack Overflow users like me.

Answer

type-a1pha picture type-a1pha · Jul 12, 2013

Take a look here:

http://developer.android.com/guide/topics/media/camera.html

There is all the code you need to make an activity which shows the camera preview.