Login     Sign Up
Tugadar (@admin)
15 days ago
13 Views

In this chapter, you’ll learn to use Android’s peer-to-peer (P2P) text and data communication pro-tocols, specifically, instant messaging and SMS (short messaging service). Using these technolo-gies, you can create applications that can communicate between devices, including multiplayer games and collaborative mobile social applications.

When this chapter was originally written, the Android SDK included a comprehensive instant messaging (IM) service (powered by GTalk) that offered access to the instant messaging frame-work. This included the ability to send and receive text messages, set user status through pres-ence, and determine the presence of IM contacts. Unfortunately, owing to security concerns the IM API has since been removed, though it’s expected that later releases of Android will expose developer access to an IM framework. This chapter will show how earlier releases of Android allowed this technology to be used for sending text IM messages and as a mechanism for broad-casting Intents to remote Android devices — a mechanism that allowed you to create applications that interact between devices in real time.

Android still offers full access to SMS functionality, letting you send and receive SMS text mes-sages within your applications. Using the Android APIs, you can create your own SMS client application to replace the native applications available as part of the software stack. Alternatively, you can incorporate the messaging functionality within your own applications.

At the end of this chapter, you’ll use the SMS Manager in a detailed project that shows how to create an emergency SMS responder. In emergency situations, it will let users quickly, or auto-matically, respond to people asking after their safety.

To be continued.....