I need to know the canonical names of a few Default Android applications like Email, Contacts & others. I want to be able to start them using their canonical names.
Like
Intent i = new Intent("com.pacakge.canonicalname");
So any ideas where i could get a list of the canonical package names of default Android apps?
thanks
There's a method in the PackageManager class called currentToCanonicalPackageNames(String[] names), which I suspect could be used to do what you're asking. So something like:
I'm looking into doing this sort of thing myself, but haven't tried this code, so use with caution.
EDIT: So tried it this evening, the solution may not be what you're looking for. Assuming you're starting with only the display names of these apps (technically referred to as application labels), you may have to actually go through all of the apps installed on the device looking for that application label. I just posted my solution to my blog, so take a look.