Friday, November 25, 2011

Android Development: Twitter App tutorials

Getting started developing for android: its not THAT bad. If you know java, you could handle android. It's just a matter of figuring out how the architecture is set up that makes things super easy for you as a developer.


I wanted to learn to write Android apps so I figured I'd try to write a twitter app to learn the ropes of how the UI is set up and how the apps within Android work. 



Using the twitter4j library...


I used these tutorials which explained a lot of things:
Development of an Android App
Sending a Tweet - explains how to set your app up to use callbacks
NOTE on CALLBACKS: When you register your app to twitter, provide a dummy callback URL so that your app can be registered as a web app or mobile app. If you leave that field blank, your app will default to a desktop app and will prevent your app from receiving the callback. 
Switching between Views within a Single Activity - do multiple tasks within one activity




The hardest part about making this Twitter app was logging into Twitter via OAuth. Its not that it's complex, theres a specific process for verification. The link on callbacks provides a very useful way to initiate a WebView within your app for logging into a service (in this example twitter) and then having the service redirect the user BACK into your app. This prevents you from having to ask the user to save a PIN and enter it into the app once they receive it. You've probably had to do this or something similar if you've used Echofon or UberSocial.


If you've been wanting to learn to do Android apps and you know java, then dive right in. Its pretty damn cool.

No comments:

Post a Comment