tags:

views:

68

answers:

2

From my application i have to open a another one application.Is there any possibility to open like this?

A: 

Probably you are looking for a way to start another class from another package

Intent myIntent = new Intent();
myIntent.setClassName("com.android.samples", "com.android.samples.Animation1");
myIntent.putExtra("com.android.samples.SpecialValue", "Hello, Joe!"); // key/value pair, where key needs current package prefix.
startActivity(myIntent);    

Read a tutorial post about Opening a Screen at Common Tasks post.

Pentium10
A: 

You can launch other applications with Activity.startActivity( intent);

Use it like this:

Intent intent = new Intent(); String pkg = "com.android.browser"; String cls = "com.android.browser.BrowserActivity"; intent.setClassName(pkg, cls); startActivity(intent);

You need to know the package and class names of the activity to call, the Package Browser in the Dev Tools app will help here if its not your own app to call.

Thorstenvv
Please note that using hand-written constants like "com.android.browser" and "com.android.browser.BrowserActivity" is using private implementation details (these are not part of the SDK), and thus you should expect such code to break across different devices and platform versions.
hackbod