I am developing simple home screen application. So when i press home button i can choose between native and mine home screen app. The problem is: if i set my app as default home screen application when i restart phone i can't enter native home screen app because it has never started so my app stands on top off stack. How can i enter native home screen app when i restart phone if mine is default home screen app? I have idea: On boot, i can check the calling intent - if it contains the Home category, i will call native home screen app. Something like this:
Intent creatingIntent = getIntent();
if (creatingIntent.hasCategory(Intent.CATEGORY_HOME))
{
creatingIntent.setPackage("com.android.launcher");
creatingIntent.setComponent(new ComponentName
("com.android.launcher",
"com.android.launcher2.Launcher"));
startActivity(creatingIntent);
finish();
}
But the problem is i don't know how can i get Component name for native home screen application, can someone help?