O'Reilly logo

Pro Android 4 by Satya Komatineni, Dave MacLean

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Sharing Data Among Packages

In previous chapters, we established that each package runs in its own process. All assets that are installed or created through this package belong to the user whose ID is assigned to the package. You also know that Android allocates a unique Linux-based user ID to run that package. In Figure 16–1, you can see what this user ID look like. According to the Android SDK documentation

This user ID is assigned when the application is installed on the device, and remains constant for the duration of its life on that device. Any data stored by an application will be assigned that application's user ID, and not normally accessible to other packages. When creating a new file with getSharedPreferences(String, int), openFileOutput(String, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required