I want to get default home application name.For this i used
Intent intent = new Intent("android.intent.action.MAIN");
intent.addCategory("android.intent.category.HOME");
intent.addCategory("android.intent.category.DEFAULT");
ResolveInfo resolveinfo =getApplicationContext().getPackageManager().resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY);
defaultHomeName = resolveinfo.activityInfo.name;
This returns com.android.internal.app.ResolverActivity and when I tried following
List<RunningTaskInfo> runningTasks =((ActivityManager) getApplicationContext().getSystemService("activity")).getRunningTasks(1);
if (runningTasks != null && !runningTasks.isEmpty()) {
for (int i = 0; i < runningTasks.size(); i++) {
RunningTaskInfo runningtaskinfo = (RunningTaskInfo) runningTasks.get(i);
}
}
got home name as com.sec.android.app.twlauncher.Launcher inside this when on the home screen .
Why the same application shows different names?How to get a unique name for default home application for all devices?