sách gpt4 ai đã đi

仅当 Skype 在后台运行时才会发生 Android Skype 调用

In lại 作者:行者123 更新时间:2023-11-29 14:15:03 hai mươi bốn 4
mua khóa gpt4 Nike

我在单击按钮时使用 Skype 从我的 Android 应用调用。下面是启动 Skype Intent 的代码:

Uri skypeUri = Uri.parse(uri.toString());
Intent myIntent = new Intent("android.intent.action.CALL_PRIVILEGED", skypeUri);
myIntent.setComponent(new ComponentName("com.skype.raider", "com.skype.raider.Main"));
myIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(myIntent);

第一次运行时,它只是启动 Skype 应用程序而不调用。当我在后台启动 Skype 时,它会调用该号码。我希望用户每次都调用该号码,而不是从第二次开始,但现在只有当 Skype 已经在后台运行时,Skype 调用才会发生。

Có gợi ý nào không?

1 Câu trả lời

我正在使用此代码发起 Skype 通话,它对我来说工作正常(每次都会发起通话):

Uri skypeUri = Uri.parse(mySkypeUri);
Intent myIntent = new Intent(Intent.ACTION_VIEW, skypeUri);

myIntent.setComponent(new ComponentName("com.skype.raider", "com.skype.raider.Main"));
myIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
myContext.startActivity(myIntent);

uri 应该看起来像这样: skype:skype_contact?通话

请参阅此处的 msdn 文章:Skype URI tutorial: Android apps

关于仅当 Skype 在后台运行时才会发生 Android Skype 调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21718918/

hai mươi bốn 4 0
行者123
Hồ sơ cá nhân

Tôi là một lập trình viên xuất sắc, rất giỏi!

Nhận phiếu giảm giá Didi Taxi miễn phí
Mã giảm giá Didi Taxi
Giấy chứng nhận ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com