Uploading images using the camera on the device
All smartphones have several kinds of hardware on board. One of the most common pieces of hardware is a camera.
In this recipe we are going to see how we can use the onboard camera of a smartphone to take a picture and automatically store it to the database.
Getting ready
For this recipe we are going to need a jQuery Mobile Smartphone application. And also we need a table to store the data.
The table needs to hold some required columns. They can be created by using the following scripts:
CREATE TABLE "APP_IMAGES" ( "ID" number, "PICTURE" BLOB, "MIMETYPE" VARCHAR2(255), "FILENAME" VARCHAR2(255), "IMAGE_LAST_UPDATE" DATE ) ; [9672_14_05.txt]
How to do it...
When the table APP_IMAGES
is available, we can start building our form to add data to it by the following steps:
Open the application in the Application Builder.
Click on Create Page.
Select Form and click on Next.
Select Form on a table or view and click on Next.
Select APP_IMAGES...