The goal of this article was to take a look at the latest Android Studio (v0.2.5) and see where it would take me in a single day.
For me an IDE should be simple, straightforward and hassle-free. The big pain in Android development has always been the IDE and more specifically the tooling around it.
Somehow the Eclipse plugins never worked well with the core Android tools and build system. Third party tools and plugins to offload dependency management to Maven were also far from ideal.
In short, it was a difficult marriage that ultimately led to choosing IntelliJ IDEA as the preferred platform for Android Development Tooling.
Unfortunately this again left developers with a 0.x product, meaning it’s going to be very rough around the edges. It’s a very difficult decision to make for developers. Stick with something you know but that is far from ideal, or go with something entirely new that is supposed to be better, but in reality could also take a very long time before it reaches some kind of stability.
For me another added complexity was a base platform that I didn’t know at all (IntelliJ IDEA) and a new build system (Gradle) that also isn’t fully featured yet for Android development.
But I decided to invest a single day on Android Studio and try to come to some kind of conclusion, while documenting the process along the way.
In this post, I’ll be discussing the steps required to created an Android application using the PhoneGap framework. For those of you who don’t know, PhoneGap is an HTML5 app platform that allows you to author native applications with web technologies. So although we are generating a native Android application (APK file) that can be put on Google Play, the actual views of our application will be made up by web pages, embedded in your native app in a WebView.
I’ve decided to use the foursquare-api-java, a project hosted at Google Code, as it offers a rich interface to interact with Foursquare. The same API calls are possible through the Google API client for Java, but it would require you to write your own model classes to do the JSON to Java translation.
I will post some sample code here on how this can be done with the Google APIs client library for java.
In the sample application hosted at Github, we’re going to display a map where the user can select a location. Upon selecting a location, we’ll load up a list of Foursquare venues that the user can select.
Upon selecting a venue, we’ll return to our map, put a marker on the map representing the venue, and allow the user to perform a checkin.
A couple of months ago, I published a post entitled A 30 minute guide to integrating Twitter in your Android application.. The post presented a sample Android application to integrate Twitter. Using the signpost library, the user was able to authorize our application to send tweets on his/her behalf. It seems that everyone is migrating to Oauth 2.0, but Twitter is still stuck at OAuth 1.0. Nevertheless, I still wanted to update the sample we did a couple of months ago for 3 reasons :
In this article, I’ll be showing you how to create a widget for the Android homescreen. Widgets can be useful to provide condensed information, without necessarily having to open your application. In addition to showing information, a widget can also be used to trigger certain actions related to your application. Instead of forcing the user to open up your application and navigating to a certain screen to perform an action, a widget can provide the user with a quick shortcut to that action. You can also dynamically change the layout of your widget (ex: when the user presses a button, the button can be highlighted, or a piece of text can altered). This article is accompanied by a sample android application that includes the widgets we’ll be discussing here.
As mentioned in the Facebook developer docs, test users can only be created using a call to the Graph API.
As described in my previous Facebook article, a dedicated webpage was available at the time to create test users, however, that page has been brought offline.
You can create a test user associated with a particular app using the Graph API with your app access token.
Today we’ll be looking at the Google APIs Client Library for Java. The API is provided by Google, and is a flexible, efficient, and powerful Java client library for accessing any HTTP-based API’s on the web. According to Google, it is the recommended library for accessing Google API’s based on REST or JSON-RPC. One of the nice things about this library is that it fully supports the Android environment out of the box. So we’ll focus on those features in this article.
To avoid confusion, Google offers the following APIs (the first one being the topic of this post, and compatible with the Android platform) :