Skype开始拨号后2秒挂断 - Android

6

我在两个安卓设备上安装了Skype (2.8.0.920)。第一个设备使用的是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);

Skype开始拨号,但在2秒后挂断。

然而,如果我用以前的Skype版本替换当前的(2.8.0.920),代码就可以正常工作。

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


可能是Skype本身的一些bug! - pixelscreen
你能告诉我你之前的版本是什么吗? - Aamirkhan
1个回答

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>            

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接