I would like to add one small clarification that was not mentioned here.
Although there cannot be two applications with the same package name, in one application that the user can see in the application to launch, there can be several launch actions. For example, the standard Maps application (package com.google.android.apps.maps) has several launch operations, such as Local, Navigation, Maps. It does not matter for users whether these "applications" (or actions in terms of the developer) are implemented in one application package or not.
The name of the action ("com.google.android.maps.MapsActivity") is also not unique, since anyone can create an application with a unique package name and activity located in the java package com.google.android.maps called MapsActivity.
Thus, if you want to find a unique identifier for all these launch actions, you must use a combination of the application package name ("com.google.android.apps.maps") and the action name ("com.google.android.maps.MapsActivity" )
Andrei Buneyeu
source share