Better late than never, they say … the most comprehensive Android Template Project released to date.
The History of the Android Template Project aka: Android Bootstrap
About a month ago I released an open source project called “Android Bootstrap”. Android Bootstrap is a multi-faceted open source project. It serves a couple of main purposes, namely as a Android Template Project and a working reference application for developers. You can view the open source site at www.androidbootstrap.com
Why it was Built
Over the last couple of years I’ve slowly accumulated various libraries and tools that I’ve used on various projects. These included (but were not limited to):
- RoboGuice
- Action Bar Sherlock
- View Pager Indicator
- GSON
- jUnit
- Maven
- Mockito
- Account Manager (how to use it mainly)
As time progressed I had my own little bastardized version of a Android Template Project I’d use each time I started developing a new app for myself or a client. However, I never had it down perfectly and felt the file structure was a bit off most of the time. But I kept using it anyway. I wanted a better solution and in the end after a few weeks of development and such Android Bootstrap was born.
How its Built
Android Bootstrap is not the end all be all of Android Template Projects. It simply provides a working example of how to build and app with full source code available. It’s not meant to be everything to everyone. When I began building Android Bootstrap it looked much different than it does now and the main reason for that is because the new incarnation that currently exists is heavily inspired from the GitHub Android App as well as the Gaug.es Android App. These apps used all of the same libraries that I used, but did it a bit more elegantly than my template project was set up. I used their nomenclature, file structure and a lot of their code to help develop Android Bootstrap.
Android Bootstrap is built using Maven and I explicitly target the usage of IntelliJ. I feel its a far superior product compared to Eclipse. While Maven is supported in Eclipse, I find it far more cumbersome than in IntelliJ. At this time there are a couple of open issues in regards to Eclipse on the issue tracker. Unfortunately I will probably not be fixing these unless a pull request comes in for them as my time is too limited. So if you’re looking for a reason to try out IntelliJ with Android, now’s your chance. 🙂
The app is separated into a parent pom.xml that acts as the aggregator. The children are the /app and /integration-tests folder. The working Application can be found in the /app directory while the tests are in the /integration-tests folder. The apk is built out of the /app folder.
Libraries/Examples Included in Android Bootstrap
These are the following examples that are included in Android Bootstrap
- Build an Android Project with Maven and the android-maven-plugin
- RoboGuice
- Action Bar Sherlock
- Action Bar Sherlock 4.x & RoboGuice 2.x Integration
- GSON
- How to make HTTP Requests with the http-request library
- AsycTasks using RoboAsyncTask
- How to download and cache an image in the Android app cache (code is in the AvatarLoader.java file)
- How to integrate with the Android Account Manager
- How to use the Action Bar and various options of it.
- How to consume JSON and hydrate POJOS from a remote API.
- How to talk to a real JSON api (API is hosted on Parse.com)
- Unit Test Examples
- Integration Tests Examples
- How to use Robotium
- How to use the ViewPagerIndicator with a FragmentPager
- How to use Fragments
- How to display images in a ListView
- … and much more
This is only an introduction to Android Bootstrap. I hope to provide some videos soon on how to set up a project with it using the code generator available on androidbootstrap.com , until next time – cheers. 🙂