✅ Publisher: Wrox
✅ Year: January 4, 2013
✅ Authors: Wei-Meng Lee
✅ Language: English
✅ Pages: 408
✅ Size: 32.1 MB
A must-have collection of ready-to-use Android recipes!
The popularity of Google Android devices is seemingly unstoppable and the Android 4 release offers, for the first time, a single OS solution for building both phone and tablet applications. With that exciting information in mind, veteran author Wei-Meng Lee presents you with 100 unique recipes that you can apply today in order to discover solutions to some of the most commonly encountered problems that exist in Android programming.
Covering the scope of multiple Android releases up through Android 4, this reference features a task description, followed by the solution(s) available, and a standalone project file that illustrates the use of the recipe. Formatting each recipe to be standalone, Wei-Meng Lee allows you to jump into the relevant recipe to find a solution to specific challenges.
- Identifies and describes a programming task, provides a step-by-step solution, and presents a full-code solution ready for download
- Covers multiple Android releases
- Addresses such topics as user interfaces, telephony and messaging, networking, Google maps, location-based services, persisting data, leveraging hardware features, and more
Android Application Development Cookbook is your solution to discovering…solutions!
Table of contents
Chapter 1: Android Fundamentals
Recipe 1.1 Linking Activities
Recipe 1.2 Passing Data Between Activities
Recipe 1.3 Passing Objects Between Activities
Recipe 1.4 Sending and Receiving Broadcasts
Recipe 1.5 Assigning Priorities to Broadcast Receivers
Recipe 1.6 Auto-Launching Your Application at Boot Time
Recipe 1.7 Calling Built-In Apps
Chapter 2: Using Views to Design the User Interface
Recipe 2.1 Using Buttons
Recipe 2.2 Using Image Buttons
Recipe 2.3 Using Radio Buttons
Recipe 2.4 Using CheckBoxes
Recipe 2.5 Implementing a Star Rating System
Recipe 2.6 Using AutoCompleteTextView
Recipe 2.7 Displaying Web Pages
Recipe 2.8 Using the TimePicker
Recipe 2.9 Using the DatePicker
Recipe 2.10 Using LinearLayout for View Positioning
Recipe 2.11 Using RelativeLayout for View Positioning
Recipe 2.12 Using FrameLayout for View Positioning
Recipe 2.13 Using TableLayout for View Positioning
Recipe 2.14 Using the ScrollView
Recipe 2.15 Displaying Context and Options Menus
Recipe 2.16 Displaying Dialogs
Chapter 3: Displaying Lists of Items and Images
Recipe 3.1 Displaying a List of Items Using the ListView
Recipe 3.2 Customizing the ListView
Recipe 3.3 Displaying Multiple ListViews
Recipe 3.4 Creating Custom ListViews
Recipe 3.5 Further Customizing Each Row with Additional TextViews
Recipe 3.6 Displaying a List of Items Using the Spinner View
Recipe 3.7 Displaying a List of Images
Recipe 3.8 Animating the Changing of Images Using the ImageSwitcher
Recipe 3.9 Displaying Images Using the GridView
Chapter 4: Telephony
Recipe 4.1 Calling from Your Application
Recipe 4.2 Monitoring the State of the Phone
Recipe 4.3 Monitoring Phone State in the Background
Recipe 4.4 Blocking Outgoing Calls
Recipe 4.5 Auto-Answering an Incoming Call
Recipe 4.6 Switching to Airplane Mode
Recipe 4.7 Getting the Phone Number, IMEI, and SIM Card ID
Recipe 4.8 Enabling Bluetooth
Chapter 5: Messaging
Recipe 5.1 Sending SMS Messages Through the Built-in Messaging Application
Recipe 5.2 Sending SMS Messages Programmatically in Your Android Application
Recipe 5.3 Monitoring the Status of Sent SMS Messages Programmatically
Recipe 5.4 Monitoring Outgoing SMS Messages
Chapter 6: Network Programming
Recipe 6.1 Connecting to Servers Using HTTP GET
Recipe 6.2 Connecting to Servers Using HTTP POST
Recipe 6.3 Downloading Binary Data Using HTTP
Recipe 6.4 Consuming XML Web Services
Recipe 6.5 Consuming JSON Web Services
Recipe 6.6 Getting the IP Address of the Device
Recipe 6.7 Creating a Socket Server
Recipe 6.8 Creating a Socket Client
Recipe 6.9 Checking for the Availability of Bluetooth
Recipe 6.10 Monitoring the State of Bluetooth
Chapter 7: Using Google Maps
Recipe 7.1 Displaying Google Maps
Recipe 7.2 Zooming in and out of Google Maps
Recipe 7.3 Changing Map Modes Recipe 7.4 Navigating the Map to a Particular Location
Recipe 7.5 Adding Markers to the Map
Recipe 7.6 Finding a User-Friendly Address Using Reverse Geocoding, and Vice Versa
Chapter 8: Location-Based Data Services
Recipe 8.1 Obtaining Geographical Location Using GPS, Wi-Fi, or Cellular Networks
Recipe 8.2 Choosing the Best Location Provider to Use
Recipe 8.3 Monitoring a Location
Recipe 8.4 Using a BroadcastReceiver to Obtain Locations
Chapter 9: Accessing the Hardware
Recipe 9.1 Capturing Pictures with the Camera
Recipe 9.2 Detecting the Presence of Hardware Features
Recipe 9.3 Checking Network State
Recipe 9.4 Turning GPS On/Off
Recipe 9.5 Capturing Hardware Buttons Programmatically
Recipe 9.6 Switching on the Flashlight
Chapter 10: Persisting Data
Recipe 10.1 Saving and Loading User Preferences
Recipe 10.2 Creating a Preference Screen
Recipe 10.3 Saving Files to the Data Directory
Recipe 10.4 Saving Files to the Cache Directory
Recipe 10.5 Saving Files to External Storage
Recipe 10.6 Attaching Files to Your Project
Recipe 10.7 Creating and Using SQLite Databases Programmatically
Chapter 11: Deploying Your Android Applications
Recipe 11.1 Localizing Your Application
Recipe 11.2 Exporting Your Application as an APK File
Recipe 11.3 Deploying Your App Through E-mail
Recipe 11.4 Deploying Your App Through the Web
Recipe 11.5 Deploying Your App Through an SD Card