| |
| |
Foreword | |
| |
| |
Introduction | |
| |
| |
| |
Introduction To Android, Mobile Devices, And The Marketplace | |
| |
| |
Product Comparison | |
| |
| |
The .NET Framework | |
| |
| |
Mono | |
| |
| |
Mono for Android | |
| |
| |
Mono for Android Components | |
| |
| |
Development Tools | |
| |
| |
Mobile Development | |
| |
| |
Getting Around Support Issues | |
| |
| |
Design Issues | |
| |
| |
Android | |
| |
| |
History of Android | |
| |
| |
Writing Web-Based Applications for Android | |
| |
| |
Writing Native Applications for Android | |
| |
| |
Android Development Issues | |
| |
| |
Android SDK Tools | |
| |
| |
Android Development Costs | |
| |
| |
Cross-Platform Alternatives | |
| |
| |
Other Cross-Platform Tools | |
| |
| |
Considerations for Selecting a Cross-Platform Tool | |
| |
| |
How Does the Tool Allow You to Author Your Application? | |
| |
| |
What Device Features Does the Tool Support? | |
| |
| |
What Platforms Does the Tool Support? | |
| |
| |
What Skill Sets Does the Tool Require? | |
| |
| |
What Tools Exist to Support Development? | |
| |
| |
How Active Are the Development Community and Support Channels? | |
| |
| |
What Are the Successful Application Deployments for This Tool? | |
| |
| |
Summary | |
| |
| |
| |
Introduction To Mono For Android | |
| |
| |
Before You Begin Developing | |
| |
| |
What Is Mono? | |
| |
| |
Mono Implementation Goals | |
| |
| |
Mono Standards | |
| |
| |
What Is Mono for Android? | |
| |
| |
Why Do I Need Mono for Android? | |
| |
| |
Familiar Development Environment | |
| |
| |
Familiar API and Library Structure | |
| |
| |
What Are the Trade-Off s of Working with Mono for Android? | |
| |
| |
Waiting for Improvements | |
| |
| |
Taking a Potential Performance Hit | |
| |
| |
Memory Management | |
| |
| |
What Do I Need for the Mono for Android Development Environment? | |
| |
| |
Java SDK | |
| |
| |
Android SDK | |
| |
| |
Visual Studio | |
| |
| |
Visual Studio Development with Mono for Android | |
| |
| |
General Setup | |
| |
| |
Building Hello Android | |
| |
| |
Logging | |
| |
| |
Debugging | |
| |
| |
Testing | |
| |
| |
Deploying | |
| |
| |
Mono for Android Development with MonoDevelop | |
| |
| |
General Setup | |
| |
| |
Building Hello Android | |
| |
| |
Logging | |
| |
| |
Debugging | |
| |
| |
Testing | |
| |
| |
Deploying | |
| |
| |
Summary | |
| |
| |
| |
Understanding Android/Mono For Android Applications | |
| |
| |
What Is an Android Application? | |
| |
| |
The Building Blocks of an Android Application | |
| |
| |
Activities | |
| |
| |
Services | |
| |
| |
Content Providers | |
| |
| |
Broadcast Receivers | |
| |
| |
Communicating between Components: Android Intents | |
| |
| |
Binding the Components: The Android Manifest | |
| |
| |
Android Manifest Basics | |
| |
| |
Editing the Manifest for Mono for Android via Visual Studio | |
| |
| |
Summary | |
| |
| |
| |
PLANNING AND BUILDING YOUR APPLICATION'S USER INTERFACE | |
| |
| |
Guidelines for a Successful Mobile UI | |
| |
| |
Building an Android UI | |
| |
| |
Views | |
| |
| |
Design Surface | |
| |
| |
Choosing a Control Layout | |
| |
| |
AbsoluteLayout | |
| |
| |
FrameLayout | |
| |
| |
LinearLayout | |
| |
| |
RelativeLayout | |
| |
| |
TableLayout | |
| |
| |
Optimizing Layouts | |
| |
| |
Designing Your User Interface Controls | |
| |
| |
TextView | |
| |
| |
EditText | |
| |
| |
AutoCompleteTextView | |
| |
| |
Spinner | |
| |
| |
Button | |
| |
| |
Check Box | |
| |
| |
Radio Buttons and Groups | |
| |
| |
Clocks | |
| |
| |
Pickers | |
| |
| |
Images | |
| |
| |
ImageView | |
| |
| |
ImageButton | |
| |
| |
Gallery | |
| |
| |
Virtual Keyboards | |
| |
| |
Selecting Your Virtual Keyboard | |
| |
| |
Removing the Keyboard | |
| |
| |
Controlling Your Menus | |
| |
| |
Introducing the Menu System | |
| |
| |
Menus | |
| |
| |
Submenus | |
| |
| |
Context Menus | |
| |
| |
Defi ning Menus as a Resource | |
| |
| |
Menus | |
| |
| |
Context Menus | |
| |
| |
Resolution-Independent UI | |
| |
| |
Supporting Various Screen Resources | |
| |
| |
Supporting Screen Sizes | |
| |
| |
Supporting Pixel Densities | |
| |
| |
Using Android Market Support | |
| |
| |
Multiple Screen Resolution Best Practices | |
| |
| |
Constructing a User Interface: A Phone and Tablet Example | |
| |
| |
Summary | |
| |
| |
| |
Working With Data | |
| |
| |
Working with SQLite | |
| |
| |
Setting Up a Database | |
| |
| |
Setting Up Tables | |
| |
| |
Using SQL Statements | |
| |
| |
Using Read/Select to Read Data | |
| |
| |
Using SQL Statements to Insert Data | |
| |
| |
Upgrading Strategies | |
| |
| |
Upgrading in Place | |
| |
| |
Copying Data | |
| |
| |
Android-Specific Database Options | |
| |
| |
SQLiteOpenHelper | |
| |
| |
Storing Data Remotely | |
| |
| |
Working with Remote Data | |
| |
| |
Accessing Enterprise Services | |
| |
| |
Using SOAP | |
| |
| |
Working with ASMX Web Services | |
| |
| |
Working with Windows Communication Foundation (WCF) | |
| |
| |
Using REST-Based Web Services | |
| |
| |
Using JavaScript Object Notation (JSON) | |
| |
| |
Posting Data with POST | |
| |
| |
Retrieving Data Using LINQ and XML | |
| |
| |
Using Asynchronous Data Retrieval | |
| |
| |
Using Web Services Responsibly | |
| |
| |
Working with Remote SQL Server Databases | |
| |
| |
Summary | |
| |
| |
| |
Binding Data To Controls | |
| |
| |
Databinding in Mono for Android | |
| |
| |
What Is a Data Adapter? | |
| |
| |
What Is an Adapter View? | |
| |
| |
How Do These Items Relate to One Another? | |
| |
| |
Working with Adapter Views and Large Data Sets | |
| |
| |
Exploring Adapters in Depth | |
| |
| |
Using Native Adapters | |
| |
| |
Exploring Adapter Views in Depth | |
| |
| |
Using Native Adapter Views | |
| |
| |
Working with Cursors | |
| |
| |
Using a Cursor to Populate a Spinner | |
| |
| |
Setting Up the Spinner and Data Source | |
| |
| |
Using a Spinner Adapter | |
| |
| |
Adding a Listener Event for a Spinner | |
| |
| |
Using a Cursor with a Gallery | |
| |
| |
Setting Up the Project | |
| |
| |
Adding the Cursor | |
| |
| |
Completing the Custom Adapter | |
| |
| |
Working with Lists | |
| |
| |
Displaying Simple Data in a List | |
| |
| |
Working with Android's ListAdapters | |
| |
| |
Customizing ListView with a Custom List Adapter | |
| |
| |
Handling ListView Events | |
| |
| |
Preferences Screen | |
| |
| |
Nested Navigation | |
| |
| |
Grouped Lists | |
| |
| |
Displaying Data in a Grid | |
| |
| |
Summary | |
| |
| |
| |
Working With The File System And Application Preferences | |
| |
| |
Working with the File System | |
| |
| |
File System Type and Structure | |
| |
| |
QuickEdit Sample Program: Working with a File Storage Example | |
| |
| |
Working with Application Preferences | |
| |
| |
Application Preference Types | |
| |
| |
Creating Your Own Application Preferences | |
| |
| |
Preferences Program | |
| |
| |
Listening for Preference Changes | |
| |
| |
Processing XML | |
| |
| |
Summary | |
| |
| |
| |
Programming With The Device Hardware | |
| |
| |
Working with Sensors | |
| |
| |
Referencing the Sensor Manager | |
| |
| |
Sensor Support | |
| |
| |
Accessing Sensors | |
| |
| |
Using Sensors | |
| |
| |
Understanding the Sensor Type Values | |
| |
| |
Responding to Acceleration | |
| |
| |
Using the XYZ Coordinate System | |
| |
| |
Coding with the Accelerometer | |
| |
| |
Building a Compass | |
| |
| |
Vibration | |
| |
| |
Networking Connectivity | |
| |
| |
ConnectivityManager | |
| |
| |
Checking User Communication Preferences | |
| |
| |
Checking for Changes to BackgroundDataSetting | |
| |
| |
Checking Current Network Configuration | |
| |
| |
Creating Network Connectivity Notifications | |
| |
| |
Wifi Manager | |
| |
| |
WiFi States | |
| |
| |
WiFi Changes | |
| |
| |
Bluetooth Manager | |
| |
| |
Working with Bluetooth State | |
| |
| |
Enabling Voice Recognition in Your App | |
| |
| |
Getting Turn-by-Turn Directions | |
| |
| |
Summary | |
| |
| |
| |
Using Multimedia - Audio, Video, And The Camera | |
| |
| |
Android Media Classes | |
| |
| |
Playing Audio and Video | |
| |
| |
Media Player Supported Formats | |
| |
| |
Programming Audio Playback | |
| |
| |
Programming Video Playback | |
| |
| |
Controlling Playback | |
| |
| |
Managing Playback Output | |
| |
| |
Recording Audio and Video | |
| |
| |
Using Intents to Record Video | |
| |
| |
Using the Media Recorder | |
| |
| |
Confi guring Video Recording | |
| |
| |
Previewing Video Recording | |
| |
| |
Audio Recording | |
| |
| |
Images and Using the Camera | |
| |
| |
Using Intents to Take Pictures | |
| |
| |
Controlling the Camera | |
| |
| |
Managing Camera Settings and Picture Options | |
| |
| |
Monitoring Autofocus | |
| |
| |
Using the Camera Preview | |
| |
| |
Taking a Picture | |
| |
| |
Reading and Writing JPEG Exif Values | |
| |
| |
Adding New Media to the Media Store | |
| |
| |
Using the Media Scanner | |
| |
| |
Adding New Media to the Store | |
| |
| |
Speech Recognition | |
| |
| |
Summary | |
| |
| |
| |
Talking To Other Applications And Libraries | |
| |
| |
Android Application Integration | |
| |
| |
Opening the Browser | |
| |
| |
Opening E-mail | |
| |
| |
Making a Telephone Call | |
| |
| |
Sending a Text/SMS Message | |
| |
| |
Opening a Location in the Maps Application | |
| |
| |
Opening a YouTube Video | |
| |
| |
Opening the Market | |
| |
| |
Application Integration | |
| |
| |
Simple Integration with HootSuite and Other Twitter Applications | |
| |
| |
Configuring Your Intent Filters | |
| |
| |
Handling Incoming Intent Requests | |
| |
| |
Integrating with Contacts | |