14.01.2013 Views

Android™ Application Development - Bahar Ali Khan

Android™ Application Development - Bahar Ali Khan

Android™ Application Development - Bahar Ali Khan

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Contents<br />

xii<br />

Saving and Loading Files 174<br />

Including Static Files as Resources 174<br />

File Management Tools 175<br />

Databases in Android 175<br />

Introducing SQLite 176<br />

Cursors and Content Values 176<br />

Working with Android Databases 177<br />

Introducing Content Providers 189<br />

Using Content Providers 189<br />

Native Android Content Providers 192<br />

Creating a New Content Provider 194<br />

Creating and Using an Earthquake Content Provider 197<br />

Summary 205<br />

Chapter 7: Maps, Geocoding, and Location-Based Services 207<br />

Using Location-Based Services 208<br />

Setting up the Emulator with Test Providers 208<br />

Updating Locations in Emulator Location Providers 208<br />

Create an <strong>Application</strong> to Manage Test Location Providers 209<br />

Selecting a Location Provider 212<br />

Finding the Available Providers 212<br />

Finding Providers Based on Requirement Criteria 212<br />

Finding Your Location 213<br />

“Where Am I?” Example 214<br />

Tracking Movement 216<br />

Updating Your Location in “Where Am I?” 217<br />

Using Proximity Alerts 219<br />

Using the Geocoder 220<br />

Reverse Geocoding 221<br />

Forward Geocoding 221<br />

Geocoding “Where Am I?” 222<br />

Creating Map-Based Activities 224<br />

Introducing MapView and MapActivity 224<br />

Creating a Map-Based Activity 224<br />

Confi guring and Using Map Views 226<br />

Using the Map Controller 227<br />

Mapping “Where Am I?” 228<br />

Creating and Using Overlays 231<br />

Introducing MyLocationOverlay 239<br />

Introducing ItemizedOverlays and OverlayItems 239<br />

Pinning Views to the Map and Map Positions 240

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!