Using a ContentProvider

In the Android security model (see the discussion in Safe and Secure), files written by one application cannot be read from or written to by any other application. Each program has its own Linux user ID and data directory (/data/data/packagename) and its own protected memory space. Android programs can communicate with each other in two ways:

  • Inter-Process Communication (IPC): One process declares an arbitrary API using the Android Interface Definition Language (AIDL) and the IBinder interface. Parameters are marshaled safely and efficiently between processes when the API is called. This advanced technique is used for remote procedure calls to a background Service thread. IPC, services, and binders are beyond the scope ...

Get Hello, Android, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.