Web API :: Matthew Mitchell
With the exception of the final Sphero project, I am finally DONE with coding for Android. It’s been sweet, and I’ve learned a lot, but the biggest thing I’ve taken away from the class is how mobile applications work differently than desktop applications. You’re much more at the mercy of the SDK.
So, nothing against Android…everything against Eclipse. I think Apple has done a better job putting together a unified approach to iOS development than Google has to Android. Whatever. TO THE ASSIGNMENT:
My app goes and gets JSON results from UrbanDictionary queries. I learned:
- There are some sick, sick people that post on UrbanDictionary
- When you demo your code to people, make sure that you check the results. You don’t want profanities flying about during a demo
- How to get JSON results
- The difference between JSON Arrays and Objects….and sometimes they’re mixed up in each other
- How to launch a browser window based off of text
There are 2 problems with my app that I wish I had time to investigate further, but, it fulfills the assignment criteria (in my opinion, Dr. Johnson will of course have the final say in that) so I’ve just gotta get the sucker in. The issues:
- When you click “execute” on the twodee activity, it shows the URLs. Not the titles. I can easily switch it to show the titles, but then I can’t figure out how to pass the URL associated with it to the Web Intent.
- If there was ever a bad link in the JSON results from Twodee, something bad would probably happen
Finally, a last tweak I’d like to make is to just automatically load the JSON results without hitting “Execute”
So: Directions:
- Type in a word you want defined
- Hit define
- Scroll around
- Define another if you like
- Hit the Twodee button
- Hit execute to run the JSON query
- tap on a link to go to it
- Hit Go Back to go back
And, screenshots: