5

I create a call directly using the default os dialer by:

Intent call = new Intent(Intent.ACTION_CALL);
call.setData(Uri.parse("tel:" + phoneNo));
startActivity(call);

Is it possible to launch Skype directly from my app?

I try to pass a number as follows:

PackageManager packageManager = getPackageManager();
Intent skype = packageManager.getLaunchIntentForPackage("com.skype.raider");
skype.setData(Uri.parse("tel:65465446"));
startActivity(skype);

Passing the number fails.

Cœur
  • 37,241
  • 25
  • 195
  • 267
ruben
  • 1,745
  • 5
  • 25
  • 47
  • ..thanks for your question which help me ..i have one doubt that how could we get the package name for the particular app –  Apr 11 '13 at 10:57
  • maybe looking at logcat can help when you are running that app in the device and device is connected to eclipse – ruben Apr 11 '13 at 12:15
  • Possible duplicate of [Launch Skype from an App Programmatically & Pass Number - Android](http://stackoverflow.com/questions/6414494/launch-skype-from-an-app-programmatically-pass-number-android) – Yara_M Oct 27 '16 at 14:08

1 Answers1

3

You need to know Skype package name (something like: com.skype.android), then you can start it:

PackageManager packageManager = getPackageManager();
startActivity(packageManager.getLaunchIntentForPackage("com.skype.android"));
jamapag
  • 9,290
  • 4
  • 34
  • 28