Web API :: Travis Boettcher
October 27, 2012 by boettcta. Filed under
Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 378
Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 379
Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 380
Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 381
Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 382
Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 383
Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 378
Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 379
Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 380
Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 381
Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 382
Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 383
Deprecated: Creation of dynamic property WP_Term::$cat_ID is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 378
Deprecated: Creation of dynamic property WP_Term::$category_count is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 379
Deprecated: Creation of dynamic property WP_Term::$category_description is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 380
Deprecated: Creation of dynamic property WP_Term::$cat_name is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 381
Deprecated: Creation of dynamic property WP_Term::$category_nicename is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 382
Deprecated: Creation of dynamic property WP_Term::$category_parent is deprecated in /var/www/twodee/blog/wp-includes/category.php on line 383
cs491 mobile, fall 2012, postmortems.
Deprecated: ltrim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/twodee/blog/wp-includes/wp-db.php on line 3030
Deprecated: parse_str(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/twodee/blog/wp-content/plugins/jetpack/class.jetpack.php on line 4255
Deprecated: Creation of dynamic property Jetpack_Carousel::$localize_strings is deprecated in /var/www/twodee/blog/wp-content/plugins/jetpack/modules/carousel/jetpack-carousel.php on line 339
For my web API project I wanted to use Wolfram|Alpha’s extensive knowledge base to create some sort of useful app. As I was perusing what the API could do, I came across a morse code encoder function and I knew I needed to go no further.
My application allows the user to enter a word or words and select the output function. When the user submits, the string is sent out to Wolfram|Alpha’s API where it is encoded. What happens when the encoded string is returned depends on the output function: one function uses the camera’s flash to flash the morse code; another uses the phone’s vibrator to vibrate the morse code; and the final function simple adds the morse code to the clipboard allowing the user to paste it into another application.

MorseCodeActivity
The other part of the application pulls a list of links from www.twodee.org and presents them in a ListActivity’s ListView. Each item is clickable and directs the browser to the clicked title’s link.

LinksActivity
There were a lot of components to the functionality of this application, and a lot of it was fairly new to me. I learned how to access the phone’s Vibrator and Clipboard, which were both easy enough to do. I decided to add a warning to the MorseCodeActivity, so I learned the basics of creating an AlertDialog. I got to play with the Observer pattern a little, and I got to learn a little about morse code. Above all, I learned that working with other people’s poorly documented code is difficult, and although I didn’t add a lot more commenting to this project, I will strive in future projects to create easier-to-read and well documented code.
If you are interested in viewing the code, it is located at https://bitbucket.org/tboettcher/cs491.web_api