Warm-up assignment

Deadline: Thursday, 27 March 2014, 23:55:00

Submit the archived Android projects to the e-mail address: petre.eftime [at] gmail.com

The assignment is individual.

Revision 2.

Description

Assignment resources archive: ndk-assignment.zip

Your task is to create a backup service for Android and an Activity or series of Activities which act as a front-end for the service. Archiving and unarchiving should be handled by a native library. The application must be able to read and write data to the phone's internal or external storage.

Points are as separated as possible: e.g. you will receive points if the application can create an archive even if the service is not implemented.

Service

The service's purpose is to give applications a quick way to backup and restore data. The service should be accessible by apps outside of it's own and be able to access the SD card. It should function in two modes: started and bound, providing similar functionality.

The service must be accessible implicitly by other applications via the “application.service.NDK_BACKUP” action.

An application should be able to start the service with an intent containing the following fields:

  • “operation” - String, containing either “archive” or “unarchive” depending on the operation
  • “path” - String, path of the folder or file to be archived or the path to the folder where the contents of the archive should be extracted
  • “archive” - String, used only by “unarchive”, the name of the archive to be processed

In case this mode of operation is used, you should add notifications to announce the user when the operation has started and ended.

An application should also be able to use the service via a binder which implements the interface described in IBinderService.aidl found in the assignment archive.

Archives are to be given a default name which includes the current date in IS0 8601 format: e.g bak2014-03-18T21:29:15.zip. If two or more archives would be given the same name, add a number to the file name before the extension for example, the second archive would be: bak2014-03-18T21:29:15-1.zip and the third: bak2014-03-18T21:29:15-2.zip.

Application

The application must be able to configure the service and provide a front-end for it, giving the user the ability to back up and restore his personal data, which might not be handled by other applications.

The application should have the following functionality through one or multiple Activities:

  • A way to set a folder for where the archives will be stored.
  • A way to create a backup and way to restore a backup. The archive (only for restoring) and path must be supplied by the user.
  • A way to explore the file system more easily, to be able to choose archives or paths for the previous tasks.

Library

The service should use a native library for archiving and unarchiving. Make an API to your liking, but the implemented functionality should be as follows:

  • Functions for archiving and unarchiving. The archive can be in any format but it must preserve relative paths and the contents of the files, including empty directories. Permissions and ownership are not important.
  • Functions for getting the file names and paths in an archive.
  • The archive should be compressed (android comes with libzlib by default)
  • It is desirable that the archives are in a standard format (zip, tar, tar.gz, 7zip, etc). You can use external libraries, but the source code for them must be available.

The library should be compilable and runnable on x86 processors.

Points

  • 3p Service
    • 1p Implementing onStartCommand functionality
    • 1p Implementing the binder functions
    • 1p Notifications
  • 4p Application
    • 1p Selecting the backup folder
    • 1p Archiving and unarchiving
    • 2p File explorer for selecting locations used in previous two tasks
  • 4p Native library
    • 2p Archiving and Unarchiving
    • 1p Compression
    • 1p Using a standard format for the archive (tar, tar.gz, zip, 7zip, etc.)

You lose 0.6 points per day for each day after the dealine, up to a maximum of 7 days.

ndk/assignments/warmup.txt · Last modified: 2014/03/22 11:42 by petre.eftime
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0