How can I get the package name of the current launcher in android 2.3 and above programmatically in Java ?
I think you should be able to use PackageManager.resolveActivity(), with the home intent.
Intent intent = new Intent(Intent.ACTION_MAIN); intent.addCategory(Intent.CATEGORY_HOME); ResolveInfo resolveInfo = getPackageManager().resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY); String currentHomePackage = resolveInfo.activityInfo.packageName;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With