Reputation: 57
I have two questions:
Upvotes: 2
Views: 1048
Reputation: 3685
The app domain is indeed what you set at the application id
Sun recomends that you use your company's Internet domain name (which is known to be unique) written in reverse. You then use subpackages for different projects. For example, horstmann.com is a domain that one of the authors registered. Written in reverse order, it turns into the package com.horstmann. That package can then be further subdivided into subpakcages such as com.horstmann.corejava.
From the Revised and Updated Java SE 6. Core Java.
See How to get a list of installed android applications and pick one to run for how to get a list of installed applications and their domains
final PackageManager pm = getPackageManager();
//get a list of installed apps.
List<ApplicationInfo> packages = pm.getInstalledApplications(PackageManager.GET_META_DATA);
for (ApplicationInfo packageInfo : packages) {
Log.d(TAG, "Installed package :" + packageInfo.packageName);
Log.d(TAG, "Source dir : " + packageInfo.sourceDir);
Log.d(TAG, "Launch Activity :" + pm.getLaunchIntentForPackage(packageInfo.packageName));
}
Upvotes: 1