Overview
So, you're walking across Sproul and you're wondering what happened here 50 years ago. You ask a student sitting near the Sproul steps. He looks at you with a odd smile and replies "Well, the Free Speech Movement of course!" This interests you a lot. You have always admired people who sacrificed all for political freedom. Being the sentimental person you are, you download this app!
Now whenever you walk through Sproul, with your Toq watch on, you will be given a notification to draw a certain expression of free speech based on 6 famous figures during the Free Speech Movement (Jack Weinberg, Joan Baez, Michael Rossman, Art Goldberg, Jackie Goldberg, Mario Savio). Once you've drawn your awesome picture on your phone just press upload and it will be added to hundreds of others #cs160fsm pictures just like yours. One of these pictures will be pushed onto your watch so you can share in the commemoration of this great event.
Description
Requirements
This application requires the Qualcomm Toq Watch and an Android device. Location services must be enabled on the phone and it must be connected to the Internet.
Installation
When you open the app on your phone you will be greeted with a pseudo installation screen. To download the applet to your watch simply press 'Install'. To uninstall the applet just press 'Uninstall'.
Usage
When you enter within 50 meters of Sproul (Latitude: N 37.86965 and Longitude: W -122.25914) you will be given a random notification with a famous figure from the Free Speech Movement. Slide this notification away to see the deck of cards. Choose the corresponding card based on the name on the notification. As soon as you do this the drawing app will be launched on your phone.
Next draw something based on the instructions given on the card. Here you have several options. There's a brush and an eraser. The top bars give you access to changing colors and stroke sizes. The trash can button clears the canvas. The Pick spinner allows you to choose image files saved in external storage. You can load images from here.
When you are done just press save and then upload. This will post a picture with the tag #cs160fsm onto Flickr. Next a new image drawn by someone else will be pushed onto your watch. You can grab another image by pressing 'New Card' on the drawing app.
Technical Details
I developed this application on Android Studio with the help of the CS160 section code samples (drawing, flickr, location, and toq). Most of the work was figuring out what parts went where. I needed to use Flickrj, the Location API, the Toq API.
Pretty much everything is in the same Activity. I thought this was a lot easier to implement than figuring out Intents between three or more activities. The installation screen is just a separate view that covers the drawing app. Pressing 'Start Drawing' simply hides it.
The color and size selection is just EditText. The file picker is just a spinner. The brush, eraser, and clear buttons are just ImageButtons. The canvas is very similar to the example given in section. The bottom buttons are a bit more interested.
Saving an image involves automatically creating a name and placing it in external storage. Loading an image involves grabbing whatever is chosen in the spinner and loading it onto the canvas. The upload button is very similar to the one given in section except that this one also pushes an image from Flickr with the tag #cs160fsm onto the watch when it's done. The New Card button basically removes the last card if it is a Flickr Image and replaces it with a new Flickr Image.
Comments