Challenge #1 Solution

$30.00

Description

1 Introduction

In thi challenge problem, you will learn how to use the camera and QLite.

2 Problem statement

Part I: Accessing the Camera

In this part, you will learn how to access the camera. Thi app will have a ingle activity. The layout consist of a ingle button and an image view. When the button i pressed, the camera is accessed, the image is captured, and the current image is di played in the Image View.

Bonus points for showing the user the image in realtime onscreen in the manner of a view finder so that he/ he know what image i being captured.

Part II: Interfacing with SQLite Database

The objective of this part is to learn how to use QLite databases. You must create a basic database with a ingle table. The column entries will be: ID and image. The qLite database must interface with your camerabased image capture app that you created in Part I as follow . Each time an image is captured, it mu t be inserted into the database with an appropriate ID. The ID begins at 1, and is updated for each successive image inserted in the database. Finally, you must have an EditText in which you can enter an ID and press a button. The appropriate image must be retrieved from the database and di played in an Image View.

XML: The layout of the lainActivity will consist of a title (TextView). a button to capture images (Buttonl}, a location to enter the ID of the image requested (EditText) along with a button to click when the text has been entered (Button2}. and a location to display images (ImageView).

JAVA: When Buttonl is pressed, the camera image is captured and written to database as a BLOB

along with an ID. When the ID is entered in EditText, the correct image hould be displayed in lmageView.

3 Evaluation Guidelines

1. Check operation using the interface.

2. Creativity carries bonus points. Eg. showing image prior to capture (as in a camera view finder).

3. Your application must run on either a phy ical or a virtual device.

1