Created
May 14, 2012 18:03
-
-
Save foota/2695386 to your computer and use it in GitHub Desktop.
Remote camera using Android devices (SL4A)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android | |
from wsgiref.simple_server import make_server | |
droid=android.Android() | |
pic='/sdcard/snapshot.jpg' | |
def camera(env,res): | |
if env['PATH_INFO']=='/': | |
droid.cameraCapturePicture(pic) | |
res('200 OK',[('Content-type','image/jpeg')]) | |
return [file(pic).read()] | |
httpd=make_server('',9998,camera) | |
httpd.serve_forever() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://handasse.blogspot.com/2010/09/pythonandroid5.html