You are on page 1of 2

Android Programming Workshop

Exercise #4 and #5 Page 1/2

Jerusalem College of Engineering

In this exercise you will develop a practical application that will wrap Pango a parking service for mobile phones. You will be only given a general specification, and we leave most of the implementation for your imagination and creativity.

Exercise #4 Due date: 11/6 @ 23:55

Project Name: Build Target: Application Name: Package Name: Create Activity: Minimum SDK:

PangoWrapper Android 2.2 PangoWrapper apw.exercise.pangoWrapper PangoWrapperActivity 8

Specifications

Graphic User Interface (GUI)

The application will have only one button, which toggles the service of the application ON\OFF.

Logic

Initially the service is OFF. Upon tapping on the button, which toggles the state to ON, do the following: Keyboard. The user will be prompt to enter his\her geolocation address, e.g. street name and number. GPS. Retrieving the geolocation coordinates of the device automatically using the GPS or network provider.

The geolocation address will be sent automatically via SMS to Pango SMS center in order to activate the parking service (see the link for the message pattern and the number for the SMS center). Upon tapping on the button for the second time, an abort SMS will be sent to Pango SMS center to deactivate the parking service. In case the user will forget to deactivate the service, we will provide two reminders time and distance reminders: Time Reminder. Every two hours the user will be prompt with the question whether he\she would like to disable the service. Distance Reminder. If the distance between the user's current geolocation and the initial distance of the service is greater than 2 kilometers, the user will be prompt with the question whether he\she would like to disable the service.

The application will react with respect to the input from the user.

Android Programming Workshop

Exercise #4 and #5 Page 2/2

Jerusalem College of Engineering

You must choose and implement at least one method above for getting the geolocation address (though you might use a combination of the two). If your application uses the GPS, make sure to turn it off after using it, so it will not drain the battery. Remember to declare any special permissions that your application needs. Define in the resources (strings.xml or integer.xml) a variable named SMS_NUM and set its value for 5556. Use this value of SMS_NUM as Pango SMS center (send your SMS's to the number specified SMS_NUM).

Implementation

Use mock location data to test your GPS implementation. Use two emulators and send SMS between them to test your SMS implementation.

Testing

In this part of the exercise, you will extend the functionality of Exercise #4 you will support the last 3 locations, which gives the user the ability to set (view and select) his\her last 3 locations that the service was activated.

Exercise #5 Due date: 17/6 @ 23:55

Implement the last 3 locations. You may use either Shared Preferences or SQL Database. You are not allowed to use neither external storage nor internal storage.

Implementation

Recall that Android is a thin device with limited resource. Hence, you must strive for the most efficient implementation.

Clarifications

You might also like