gpt4 book ai didi

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

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:45:19 25 4
gpt4 key购买 nike

我在两台 Android 设备上安装了 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 秒后挂断。

但是,如果我将当前 (2.8.0.920) Skype 版本替换为 以前的 版本,代码可以正常工作。

这是为什么?有帮助吗?

最佳答案

这是我找到的解决方案;

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>

关于java - Skype 开始拨号并在 2 秒后挂断 - Android,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11542070/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com