Smith
Smith

Reputation: 221

Can i call one application from another application?

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

Answers (4)

Bipin Vayalu
Bipin Vayalu

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);

See Here...

Upvotes: -1

rajesh
rajesh

Reputation: 1

use intent and startActivity and pass the category name in intent

Upvotes: 0

Niranj Patel
Niranj Patel

Reputation: 33238

try this..

Intent i = new Intent(Intent.ACTION_MAIN, null);
i.addCategory(Intent.CATEGORY_HOME);
startActivity(i);

Upvotes: 4

Joe Simpson
Joe Simpson

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

Related Questions