Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
As you have witnessed in previous chapters, when you develop an application in Android, you end up with an .apk file. You then sign this .apk file and deploy it to the device. Let’s learn a little bit more about Android packages.
Each .apk file is uniquely identified by its root package name, which is specified in its manifest file. Here is an example of a package definition that we will be using for this chapter (the package name is highlighted):
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.androidbook.library.testlibraryapp"
...>
...rest of the xml nodes
</manifest>
If you were the developer of this package and signed it and installed on the device, no one else other than you can update this package. The package name is tied to the signature with which it is signed. Subsequently, a developer with a different signature cannot sign and install a package with the same fully qualified Java package name.