Enterprise Android: Programming Android Database Applications for the Enterprise


The definitive guide to building data-driven Android applications for enterprise systems

Android devices represent a rapidly growing share of the mobile device market. With the release of Android 4, they are moving beyond consumer applications into corporate/enterprise use. Developers who want to start building data-driven Android applications that integrate with enterprise systems will learn how with this book. In the tradition of Wrox Professional guides, it thoroughly covers ...

See more details below
BN.com price
(Save 22%)$44.99 List Price

Pick Up In Store

Reserve and pick up in 60 minutes at your local store

Other sellers (Paperback)
  • All (19) from $5.99   
  • New (13) from $5.99   
  • Used (6) from $9.83   
Enterprise Android: Programming Android Database Applications for the Enterprise

Available on NOOK devices and apps  
  • NOOK Devices
  • Samsung Galaxy Tab 4 NOOK 7.0
  • Samsung Galaxy Tab 4 NOOK 10.1
  • NOOK HD Tablet
  • NOOK HD+ Tablet
  • NOOK eReaders
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK for Web

Want a NOOK? Explore Now

NOOK Book (eBook)
BN.com price
(Save 42%)$44.99 List Price


The definitive guide to building data-driven Android applications for enterprise systems

Android devices represent a rapidly growing share of the mobile device market. With the release of Android 4, they are moving beyond consumer applications into corporate/enterprise use. Developers who want to start building data-driven Android applications that integrate with enterprise systems will learn how with this book. In the tradition of Wrox Professional guides, it thoroughly covers sharing and displaying data, transmitting data to enterprise applications, and much more.

  • Shows Android developers who are not familiar with database development how to design and build data-driven applications for Android devices and integrate them with existing enterprise systems
  • Explores how to collect and store data using SQLite, share data using content providers, and display data using adapters
  • Covers migrating data using various methods and tools; transmitting data to the enterprise using web services; serializing, securing, and synchronizing data
  • Shows how to take advantage of the built-in capabilities of the Android OS to integrate applications into enterprise class systems

Enterprise Android prepares any Android developer to start creating data-intensive applications that today’s businesses demand.

Read More Show Less

Product Details

  • ISBN-13: 9781118183496
  • Publisher: Wiley
  • Publication date: 10/28/2013
  • Edition number: 1
  • Pages: 408
  • Sales rank: 1,456,060
  • Product dimensions: 7.30 (w) x 9.20 (h) x 0.90 (d)

Meet the Author

Zigurd Mednieks is an author and consultant to developers ofAndroid-based systems.

G. Blake Meike is an engineer, author, and educator who hasworked with Java and Android since they began.

Laird Dornin helped build a mobile Java operating system, hasco-authored two books on Android, and is an architect for a majorwireless carrier.

Zane Pan has held architect level roles at many large companies(DEC, Intuit, EMC, and most recently, Nokia).

Wrox Professional guides are written by working developers toaddress everyday needs. They provide examples, practical solutions,and expert education in new technologies, all designed to helpprogrammers do a better job.

Read More Show Less

Table of Contents



Android Is a Java Operating System 2

Your Tools and Your First Android App 2

Prerequisites and Getting Ready 2

Toolchain Test Drive 4

One Code-Base for All Types of Devices 4

Getting Started with the Code Framework Example 5

Automatically Adapting to Screen Size 10

Components, Views, and Lifecycle 11

Destroying and Re-Creating Components 11

The Main Activity Class 12

Activity: The Basic Unit of User Interaction 12

Fragment: A Tool for Organizing Code and UI 17

The Pick Fragment Class 18

The Item Fragment Class 22

The Item Detail Fragment Class 25

Tying Together Activities, Fragments, and the Action Bar 25

The Tabbed Activity Class 25

A Main.xml File for Large Tablets 28

A Main.xml and a Subsidiary Activity for Smaller Screens 29

The Tab Activity Class 30

The Android Task and Process Model 33

Starting Dalvik Instances 34

Death, but No Transfi guration 34

Tasks Span Applications and Processes 35

Multiprocessing, Security, and Lifecycle 35

The Process and User ID as Security Boundary 36

Declaring Application Properties 36

Summary 37


Databases and the Relational Model 40

The History of the RDBMS 41

The Relational Model 41

Other DBMS Features 43

The SQL Language 45

Introduction to SQLite 48

SQLite from the Command Line 49

An Example SQLite Database 53

Summary 58


SQL in Java: The SQLiteDatabase Class 60

Basic SQL Embedding 60

Syntactic SQL 61

Creating a Database: The SQLite Open Helper Class 67

Managing a Database 71

Cursors, Loaders, and Adapters 73

Cursors 74

Adapters and View Binders 76

Loaders 79

Summary 81


Using a Content Provider 84

URIs as Names for Virtual Datasets 84

Content Resolvers: The Link between Clients and Providers 85

Content Observers: Completing the Loop 87

IPC: System-Wide Accessibility 89

The Contract: URIs and Types 90

Authority 91

Virtual Table URIs 93

Return Value MIME Types 94

Permissions 94

Publishing the Contract 95

Implementing the Content Provider 95

Creating the Content Provider 96

Return Types and the URI Matcher 97

Writing the Database 98

Database Queries 101

Content Observers (Again) 105

Permissions and Registration 106

Content Providers and Files 109

Summary 114


Basic REST 116

Why REST? 117

REST over HTTP 118

An Example REST API 120

Contact Representation 120

Contact Methods and URIs 122

Contact Transactions 122

Android Networking 125

The Apache Libraries 125

The java.net Libraries 126

Permissions 128

Considering Concurrency and Lifecycles 128

The Android Concurrency Architecture 128

A Naive Request 129

An Architecture for Robust Networking 131

Approach 1: Service-Centric 131

Approach 2: ContentProvider-Centric 133

Approach 3: SyncAdapter-Centric 135

REST within Android 135

The restfulCachingProviderContacts Project: An Example Client136

Adding a Contact 138

Using Sync Adapters 143

Android Account Management 144

Creating a Sync Adapter 155

Summary 165


A Choice for Service Development 168

The Lifecycle of a Request 168

Three-Tier Service Architecture 169

Service Development Background 169

Building a RESTful Service for Contacts 172

A Conservative Software Stack 172

Writing the Examples: Spring Contacts Service

and Its Synchronization Variant 175

Code Example: Spring Sync Contacts Service 195

Summary 202


Cloud Performance and Scalability 206

The Scale of Mobile 207

Persistence in the Cloud: From SQL to NoSQL 208

Database File Format 211

NoSQL Persistence 213

Design Considerations for Scalable Persistence 215

To SQL or Not to SQL? 215

Looking at Popular Cloud Providers 218

Amazon AWS 218

Google App Engine 219

Joyent: Hosted MongoDB+node.js 219

Red Hat OpenShift 220

Exploring the Code Examples 220

The Contacts DAO Interface (Again) 221

Writing the Code: Amazon Contacts Service 221

Writing the Code: Google App Engine Contacts 235

Summary 243


PIM Databases: Fossils from Smartphone Pre-History 246

Android’s Contacts Provider 246

The Contacts Contract API 246

A Contacts Provider Explorer 247

Code for Exploring a Database 249

Source Code for a Contacts Provider Explorer 249

Summary 262


Introducing WebData and Project Migrate 266

How Project Migrate Works 266

How Project Migrate Streamlines the Mobile Connection to theEnterprise 267

The WebData API in Detail 268

The WebData API RESTful Protocol 269

Project Migrate in Detail 279

The Migrate Project Android WebData Client 279

Project Migrate Android Features 279

The WebData Content Provider Android API 281

Android Built-In Provider APIs 281

The Migrate Provider API 281

Summary 281

Service-Side Advantages 282

Client Advantages 282


The Migrate Client 284

Creating a Migrate Project 285

Step 1: Importing the Project 285

Step 2: Enabling the Project as a Migrate Client 285

Step 3: Defi ning the Information to Be Managed by Migrate286

Step 4: Generating the Contacts Contract 287

Interfacing with the Migrate REST Proxy 291

Step 5: Starting a Local Migrate Service 296

Step 6: Publishing Your Application’s Schema 296

Setting Up a Device 298

Step 1: Installing the Migrate Client 298

Step 2: Adding a WebData Account 299

Step 3: Turning on Synchronization 299

Step 4: Running the Application 300

Step 5: Confi guring an Account in Migrate Contacts (Optional)300

Future Directions: MigrateClinic 300

Summary 303


Modularity and Flexibility Comparedwith a “Cookbook”Approach 306

Overview of Modules 306

Layout Changes 307

Direct Manipulation 308

The Tabbed Activity Class 308

The Tabbed Paged Fragment Class 319

Navigation 320

Multitasking in a Small-Screen Environment 320

The Android Task Model 320

Tasks and the Conventional Process Model 321

Modifying Task Behavior 321

Navigation in Tablets 323

Choosing to Use the Support Package 323

Summary 324


Platform Security 326

Keeping Handsets Safe 327

Avoiding Malicious Applications 327

Understand Malware Mechanics: The Malware Genome 330

Writing Secure Applications 331

Hacking Targets 331

Ingredients of a Secure Application 332

Example Code: Protecting RESTful Invocations 353

Preventing Piracy 365

Summary 366


Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)