Ten Free Sample Applications and SDKs - The Part of Tens - Android Application Development For Dummies, 3rd Edition (2015)

Android Application Development For Dummies, 3rd Edition (2015)

Part V. The Part of Tens

webextra Enjoy an additional Android Part of Tens chapter online at www.dummies.con/cheatsheet/androidappdevelopment.

In this part . . .

Part V consists of some of the best secret‐sauce‐covered Android nuggets that you acquire only after having been in the development trenches for quite some time. Chapter 21 lists some of the best sample applications that can help springboard you on your way to creating the next hit application. These applications range from database‐oriented apps to interactive games to applications that interact with third‐party web application programming ­interfaces (APIs).

Part V closes with a list of professional tools and libraries that can help streamline and improve the productivity of your application development process and make your life as a developer much easier.

Chapter 21. Ten Free Sample Applications and SDKs

When you develop Android apps, you may run into various roadblocks based on the code. Perhaps you want an app to communicate with a third‐party API that returns JSON or to perform collision detection in a game. You can usually search the web for sample code because someone else has likely already written it. Then all you have to do is review the code, alter it to fit your needs, and continue with development.

Reviewing sample code increases your knowledge even if you don’t need the code in an application. In fact, a good way to find out how to program for Android is to look at sample code. Sure, it comes supplied with the Android SDK — in the API Demos, for example (seeChapter 2) — but a truly cool plethora of real‐world application code is freely available on the web. You can find on the Internet plenty of high‐quality open source applications to serve as examples, thanks to the open source nature of Android.

Most of the ten excellent open source applications and samples in this chapter are real‐world Android applications that you can install from the Google Play Store. Try an application on your device, and then crack open its source code to see how the gears turn.

Android Samples

The samples folder of the Android SDK holds the source code for the various Android samples, which demonstrate how to use various Android APIs via small, digestible, working examples. You can find tons of simple, straight‐to‐the‐point examples in the Android samples source code. Incorporating animation into your project or playing an audio file inside your app is easy because API Demos provides examples of both. If you have a lot of ideas but not a lot of time, you should definitely install this demo app on your device and play with its numerous examples to see exactly what they can do. The samples are easy to use with Android Studio: Just go to File⇒Import Sample to browse the list of available samples and import them into a new Android Studio project.

The Google I/O App

https://github.com/google/iosched

Every year, throngs of Google developer groupies descend on Moscone West in San Francisco for a multi‐day conference to discuss all things Google. The official conference app is written for Android devices, and the source code serves as an example of how to write good apps for the platform.

K9 Mail

http://code.google.com/p/k9mail/

K‐9 Mail is a popular email client for Android that used to ship with Android before it became a separate app. It’s an extraordinarily full‐featured open source application, with functionality such as search, push, sync, flagging, signatures, and more.

GitHub Android App

https://github.com/github/android

GitHub is a popular community of open source projects that uses the Git Distributed Version Control System (DVCS). The GitHub Android App lets you view, from the palm of your hand, all your favorite GitHub repositories located on GitHub.com. The application demonstrates how to use the GitHub API as well as the RoboGuice framework.

Facebook SDK for Android

http://github.com/facebook/facebook-android-sdk

If you’re feeling ambitious, you can tackle the task of creating the next popular Facebook application, even if you don’t know where to begin. Use the Facebook Android SDK to easily integrate Facebook functionality into your application — authorize users, make API requests, and much more. Integrate all the goodness of Facebook without breaking a sweat.

Notepad Tutorial

http://d.android.com/guide/tutorials/notepad/

If you’re interested in understanding the basic principles of SQLite without all the fluff of services, background tasks, and other technical concepts, Notepad Tutorial is for you. Although simple in its execution and usage, the source code and tutorial that go along with it are helpful.

U+2020

https://github.com/JakeWharton/u2020

Jake Wharton is a prodigious contributor to the Android open source community. Among his many projects is the U+2020 app, which showcases a number of open source libraries including Dagger, Retrofit, Picasso, OkHttp, RxJava, Staggered Grid, and many others.

Lollipop Easter Egg

https://github.com/android/platform_frameworks_base/blob/master/packages/SystemUI/src/com/android/systemui/egg/LLand.java

Were you alive in 2014? Then you’ve probably heard of Flappy Bird. Perhaps even you or someone you love were unlucky enough to succumb to that terrible affliction. Well, now you can unleash it upon everyone you know who has Android 5.0 by tapping a bunch of times on “Android version” in Settings, and then long‐pressing on the resulting lollipop. And if that’s not enough, take a tour of the source code on Android Open Source Project (AOSP) using the link above.

Android Bootstrap

>http://www.androidbootstrap.com

Building an app from scratch takes time. Android Bootstrap can be a great way to shortcut that process. It includes a full working implementation of Fragments, Fragment Pager, ActionBar via AppCompat, Navigation Drawer, ViewPagerIndicator, Retrofit, GSON, Robotium for integration testing, API Consumption with an API on Parse.com, and much more. It’s no substitute for understanding how to build Android apps, but it can be a helpful tool to bootstrap your next Android project with a few commonly used tools.

The AOSP

https://source.android.com

Nearly everything about Android is open source. This means that the source code of the operating system itself, including many of the apps it ships with, is available online for you to browse at the Android Open Source Project (AOSP). The source is massive and you may find it a little difficult to navigate, so you may want to check out the GitHub mirror at http://android.github.io, which makes it easier to contribute to the source if you’re a github user.