I released the The Globe in My Bucket Application (TGIMBA) android client in the Google Play Store 🙂
Locate in Google Play Store:
1-Go to https://play.google.com/store?hl=en
2-Search for ‘TGIMBA’
Source Code – https://github.com/ehelin/TGIMBAAndroid
API Source Code (same as other clients) – https://github.com/ehelin/TGIMBA
The Android release is a totally different set up and this release was my first venture into the Google Ecosystem. This meant using the Android Studio Integrated Development Environment (IDE) which was new to me. My one previous Android application had been completed in Eclipse which is a very nice IDE with a lot of users. I think Google is trying to ‘own’ more of the Android Eco-system and this is one of many steps toward that goal. Initially, I was a little annoyed I had to learn another IDE. However, I was pleasantly surprised. Unlike Microsoft’s Visual Studio Store setup which requires a developer account, I was able to download Android Studio and start using it without an account. Of course there was a learning curve, but it was not as difficult as I thought it would be. All of the keyboard shortcuts are different and the build is as well, but once I figured out where most things were (thanks to the many, many bloggers out there), it is a nice IDE.
The next new step was to use the ‘Android’ flavor of Java. Previously, I had used org.apache.http.client.HttpClient to make all my Application Programmatic Interface (API) calls. With API 23, this class has been deprecated in favor of HttpUrlConnection (see reference #1). You can still use HttpClient in API 23, but I wanted to be compatible moving forward, so I ended up using HttpUrlConnection. It did prove to be a little more difficult to use than HttpClient. The biggest issue was posting to my .NET API. I was able to make posts from other .NET applications as well as from Postman, but the post object using this class always came back into the API method as null. I think the issue was on the .NET API side, but I could never find a work around using a Post. So, I used a Get for all calls. Unconventional, but it works and was enough for me to get the application into the store. I am going to list it as a known bug on the TGIMBA Road map and hopefully fix it in the next release.
Another item that I learned creating this client was the virtues of having a template based view. With this client and previous projects, I have always constructed my User Interfaces (UI) dynamically in code. Moving forward, I am no longer going to do this and will use markup views appropriate to the technology and bind the data to it.
Another deprecated class was one for converting a string to Base64. The deprecated class works and its successor did not (for me). I am going to hopefully rectify this in the next version. The working class/method is org.apache.commons.codec.binary.Base64.encodeBase64(arg). Its replacement is supposed to be android.util.Base64.encode(arg). The odd thing is that the decode version from the new class works just fine. It may turn out to be bug in my code.