如何查明 Android 上的 Skype 通话当前是否处于活动状态
好的,我反编译了 Skype 的清单,以查明通话期间是否有任何服务或广播正在运行。 只有少数来电内部广播。而且仅存在一个接收器和一项服务。
我使用我的应用程序监视所有正在运行的服务,但 SkypeMainService 始终在运行,即使不在通话中也是如此。
另外 AudioMode
不会被 Skype 更改(但根据开发人员想要的 logcat-logs,但他们只是不这样做),所以我不能简单地检查它是否是 MODE_IN_CALL< /代码>。
您对如何查明 Skype 当前是否正在运行并且正在进行通话有什么建议吗?
谢谢!
/编辑:活动等的简要概述:
<activity android:name="com.skype.raider.Main">
<activity-alias android:name="com.skype.raider.ui.SplashScreenActivity" android:targetActivity="com.skype.raider.Main">
<receiver android:name="com.skype.MainReceiver" android:enabled="true" android:exported="false">
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.MEDIA_MOUNTED" />
<action android:name="android.intent.action.SEARCH" />
<action android:name="android.intent.action.CALL_PRIVILEGED" />
<action android:name="com.skype.raider.INCOMING_GSM_CALL" />
<action android:name="com.skype.raider.ON_GSM_CALL" />
<action android:name="com.skype.raider.intent.action.request_sync" />
</receiver>
<service android:name="com.skype.MainService">
Okay, I decompiled Skype's manifest to find out if there are any Services or Broadcasts running during a call.
There are only a few internal broadcasts for incoming calls. Also only one receiver and one service exist.
I monitored all running services with my app, but the SkypeMainService is always running, even if not in a call.
Also AudioMode
is not changed by skype (but according to the logcat-logs the dev wanted to, but they just don't do it), so I cannot simply check if it is MODE_IN_CALL
.
Do you have any suggestions how to find out, if Skype is currently running and having an active call?
Thanks!
/edit: A brief overview of the Activities etc:
<activity android:name="com.skype.raider.Main">
<activity-alias android:name="com.skype.raider.ui.SplashScreenActivity" android:targetActivity="com.skype.raider.Main">
<receiver android:name="com.skype.MainReceiver" android:enabled="true" android:exported="false">
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.MEDIA_MOUNTED" />
<action android:name="android.intent.action.SEARCH" />
<action android:name="android.intent.action.CALL_PRIVILEGED" />
<action android:name="com.skype.raider.INCOMING_GSM_CALL" />
<action android:name="com.skype.raider.ON_GSM_CALL" />
<action android:name="com.skype.raider.intent.action.request_sync" />
</receiver>
<service android:name="com.skype.MainService">
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以采取以下措施来增加猜测的机会:
1) 检查应用程序是否正在运行:
2) 使用 PhoneManager
3) 最后检查 Skype 任何已知 api 的开发者页面
There is a few things that you can do to increase your chance of guessing it:
1) Check if the application is running:
2) Check the phone state for data exchanging using the PhoneManager
3) and finally check Skype developers page for any known api
好吧,我真的希望有人能提供有用的答案。但是,我在评论中采纳了 Reuben 的建议并制定了这个方法:
然后我检查结果是否等于 com.skype.raider.Main。如果没有正在进行的 Skype 通话,但主应用程序已打开,该值也会返回 true。
感谢您的所有帮助,尤其是鲁本!
编辑:您的清单中需要以下权限
Okay, I really hoped someone would provide a useful answer. However, I picked up Reuben's advice in the comment and made this method:
Then I check if the result equals
com.skype.raider.Main
. This will also return true if there is no active Skype call, but the main app is open.Thanks for all the help, especially Reuben!
Edit: Your will need the following permission in your manifest
当 Skype 更改其中任何内容时(可能是在 2 天后的更新中 - 在您完成编码之前),您的代码可能会崩溃。所以我认为不值得尝试此类事情。
抱歉,这可能不是一个“答案”,但我认为为此投入时间不值得。
The day Skype changes any of this (might be in that update that's coming in 2 days from now - before you finish coding) your code might break. So I don't think its worth attempting anything of this sort.
I am sorry, this might not be an "answer", but I don't think time invested into this is worth it.