O'Reilly logo

Professional Android Open Accessory Programming with Arduino by David Cuartielles Ruiz, Andreas Goransson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5

Creating the Accessory Library

WHAT’S IN THIS CHAPTER?

  • A short introduction to Android libraries
  • Implementing the MQTT protocol
  • Building a library capable of handling accessory communication

WROX.COM CODE DOWNLOADS FOR THIS CHAPTER

The wrox.com code downloads for this chapter are found at www.wrox.com/remtitle.cgi?isbn=1118454766 on the Download Code tab. The code is in the Chapter 5 download and individually named according to the names throughout the chapter.

Almost all current mobile applications leverage communication in different formats; however, in many cases as a developer you never have to worry about how the data is passed from point A to point B — it just magically happens. In this chapter you create your first set of Android Open Accessory-enabled applications, but before you get started on the applications you should define the common denominator — the USB communication.

Reusability is an amazing feature of any well-designed software stack; of course, I don’t have to tell you this. We’ve all come in contact with this concept in one way or another when leveraging system libraries or custom additions and plug-ins for various platforms.

Be it web, desktop, or mobile, leveraging reusable software stacks is a key feature of success in our business. For this reason, in this chapter you create an Android library project that handles the communication with the USB accessory, and you use this library in all of the Android Open Accessory (AOA) projects you build ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required