Assignment 5, Due Friday, April 5th at 11:59pm
This assignment is an Android programming assignment.
For this assignment, you are expected to create a viewer for animations that your assignment 3 creates. You will need to make a small change to your assignment 3 code as follows:
- For assignment 3, your program creates basic animations. You should modify assignment 3 so the animations can be saved to a file. For writing to files, you should check out the file i/o lesson. in the java tutorial. XML is a useful format for output. You can see how to write a basic XML file here. A simple example of reading XML is here.
- When saving your animations to a file, I would suggest saving them as animations in frame counts. So, if you are running at 30 fps, you don't need to count up by 33.3 ms for each data point, just save each time slice as 1, 2, 3, etc. This way, when you load the file on android, you can set the frame rate to whatever you want and play the animation at a user-selectable rate.
Once your assignment 3 is altered, create a viewer on Android for your animations. The viewer should have, at minimum, two Activities. The first should play the animation. Set a default frame rate like 30 fps. Recall that your animation should be read in with time as a sequence of frames, not in ms. The second activity, called from the first, should allow the user to specify a fps rate, a background colour for the animation, and any other appropriate parameters that you can think of to set. Basically, it is a config screen.
Most of your codebase (except the UI) should be re-usable from assignment 3. If you feel you need to use a generic code base, you may borrow a base implementation of assignment 3 from any source you choose with no penalty. Note that this base implementation should not include file saving, but any complete, functioning, assignment 3 is perfectly acceptable for you to use, provided you attribute the assignment 3 implementation to the appropriate source. If you use your own codebase from assignment 3, you will receive a 10% bonus on assignment 5.
Submission
Submit the following:
- Your desktop app code base for the desktop application (i.e. assignment 3 with "saving animations" in XML implemented) in a subdirectory in your A5 directory.
- Your Android app code base and an apk file for Assignment 5 in a subdirectory.
- Two data files containing animations created using your desktop app above in a third subdirectory.
- A readme file in the top level A5 directory describing your application and all pertinent details.
Grading
Grading scheme is as follows:
- Compiles and runs on Android: 5%
- Plays an animimation on Android (any animation, even a pre-packaged animation that you automatically load from the apk directory): 35%
- Allows change in frame rate and background colour for the animation using a second activity: 20%
- Loads animations using a basic file dialog: 15%
- Desktop app modified to save animations which can be copied to android and used by app: 10%
- Extension/enhancement to the app: 15%
- Use of your own A3 codebase: 10% bonus
As always, TAs may, at their discretion, assign up to 5% bonus to exceptional assignments. As a result, the maximum mark available on this assignment is 115/100.