Reputation: 221
i want to call Home-Screen launcher Home-Screen app from my application's activity. can i call it??
please suggest me how to integrate it?
Upvotes: 1
Views: 962
Reputation: 3145
Try this
final Intent intent = new Intent(Intent.ACTION_MAIN, null);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
final ComponentName cn = new ComponentName("com.android.settings", "com.android.settings.fuelgauge.PowerUsageSummary");
intent.setComponent(cn);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity( intent);
Upvotes: -1
Reputation: 33238
try this..
Intent i = new Intent(Intent.ACTION_MAIN, null);
i.addCategory(Intent.CATEGORY_HOME);
startActivity(i);
Upvotes: 4
Reputation: 2594
You will need to send an intent with category CATEGORY_HOME
Your code might look as follows:
Intent i = new Intent();
i.addCategory(Intent.CATEGORY_HOME);
i.setAction(Intent.ACTION_MAIN);
startActivity(i);
http://developer.android.com/reference/android/content/Intent.html
Upvotes: 0