In this recipe, you will learn to capture a picture on your device camera. You will learn to access the Camera app on your Android device and click the pictures.
Capturing images using a camera
How to do it...
In this recipe, we will be making use of the following method cameraInteractiveCapturePicture(), which activates the picture capturing app on an Android device and the clicked picture is saved to the SD card with the specified name.
Let's take a look at the following steps:
- Type the following code in the Python script demoCamera.py in the current folder of your computer:
import android
app = android.Android()app.cameraInteractiveCapturePicture("/sdcard/cameraPic.jpg")
- Copy or push this Python...