Chapter 13. Building Android applications in C

This chapter covers

  • Building an application in C
  • Using dynamic linking
  • Building a DayTime Server in C
  • Building a Daytime Client in Java

Up to this point, this book has presented a cross section of development topics in an effort to unlock the potential of the Android platform for the purpose of delivering useful, and perhaps even fun, mobile applications. In chapter 12 you built a comprehensive application, building on what we introduced in the prior chapters. As you embark on this chapter, you’re temporarily leaving behind the comforts of working strictly in the Android SDK, Java, and Eclipse. We’ll instead take a close look at the underlying Linux underpinnings of the Android platform—and more specifically, you’ll learn how to build an application in C, without the SDK.

The Android SDK is comprehensive and capable, but there may be times when your application requires something more. This chapter explores the steps required to build applications that run in the Linux foundation layer of Android. To accomplish this, we’re going to use the C programming language. In this chapter, we use the term Android/Linux to refer to the Linux underpinnings of the Android platform. We also use the term Android/Java to refer to a Java application built using the Android SDK and Eclipse.

13.1. Building Android apps without the SDK

13.2. Solving the problem with dynamic linking

13.3. What time is it? The DayTime Server

13.4. Daytime Client

13.5. Summary