Trying to launch and pass tel. no. to skype by this code from my app:
PackageManager packageManager = getPackageManager();
Intent skype = packageManager.getLaunchIntentForPackage("com.skype.raider");
skype.setData(Uri.parse("tel:65465446"));
startActivity(skype);
Skype is launched but it can't catch the number.
Skype 2.X has significantly different manifest then Skype 1.X. There is no ContactSkypeOutCallStartActivity there. New manifest contains code:
So you should write:
Please note, that this method doesn't allow you to start call/chat using Skype. It works with Skype Out only.
I found that the code above did not work...
The commented out lines either stopped it functioning, or did nothing!
The code as presented will call Skype and arrive at a page where you can choose Skype contacts More information will be most welcome John
With this code you will get the intent of the Skype activity not the caller activity. So you have to find the intent for the activity which has the intent filter for action CALL. But more clearly Skype uses the action
android.intent.action.CALL_PRIVILEGED
, so find by this filter. Just for information that caller activity iscmp=com.skype.raider.contactsync.ContactSkypeOutCallStartActivity
.Use this code for Skype version 2:
In case you want to trigger a video call you will have to add "?call&video=true" to your Skype URI.
More information about Skype URIs are documented at: http://developer.skype.com/skype-uris-program/skype-uri-ref
EDIT :
Direct Skype call without any intent chooser :
If you want direct skype call without any intent chooser, add these lines in your manifest file...
This code works for me to start a call between two Skype users:
To find this (and others), use apktool to open up the Skype APK. Look at the AndroidManifest.xml and you'll see all the intent filters they know about. If you want to trigger one of those intent filters, you need to make an intent that will match one. Here's the intent filter that the code above is matching:
You get the category "android.intent.category.DEFAULT" for free from {{new Intent()}}, so all that remains is to set the action and the URI.
The intent filter for tel: URIs looks like this:
So you set to the action and give the Intent a tel: URI and "the right thing happens". What happens is that Android finds the correct provider for the tel: URI. It might get the user's input to choose between the Phone App and Skype. The priority for Skype to handle tel: URIs zero, which is lowest. So if the Phone App is installed, it will probably get the Intent.