Skype开始拨号并在2秒后挂起 - Android

Roy*_*mir 6 java android skype android-intent

我在两台设备上安装了Skype(2.8.0.920)Android.第一台设备配备Android 2.2,第二台配备4.04.

当我通过执行以下代码发起呼叫时......

Intent skype_intent = new Intent("android.intent.action.CALL_PRIVILEGED"); 
skype_intent.setClassName("com.skype.raider", "com.skype.raider.Main");   
skype_intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);                  
skype_intent.setData(Uri.parse("tel:PassportCard"));                 
act.startActivity(skype_intent);
Run Code Online (Sandbox Code Playgroud)

... Skype开始拨号在2秒后挂断.

但是,如果我用前一个替换当前(2.8.0.920)Skype版本,代码工作正常.

为什么是这样?有帮助吗?

Roy*_*mir 0

这是我找到的解决方案;

In Java file:
Intent iskype = new Intent("android.intent.action.VIEW"); 
iskype.setData(Uri.parse("skype:PassportCard")); 
act.startActivity(iskype);

In AndroidManifast.xml
<intent-filter> 
      <category android:name="android.intent.category.DEFAULT" />
      <action android:name="android.intent.action.VIEW" />                     
      <data android:scheme="skype" /> 
</intent-filter>            
Run Code Online (Sandbox Code Playgroud)