在一个会话中发送USSD请求 [英] Sending USSD request in one session

查看:250
本文介绍了在一个会话中发送USSD请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用这种格式的* 123 * 1 * 3#呼叫ussd,以缩短拨打* 123#等待菜单然后1等待菜单然后3的拨号过程.

I would like to call a ussd in this format *123*1*3# to shorten the process of dialing *123# waiting for menu then 1 waiting the menu then 3.

我发现在某些usdd调用中这是可能的,而在某些情况下是不可能的,但是它们是执行此操作的应用程序的数量,例如 https://usehover.com

I discover that in some ussd calls it's possible and some not possible but their are number of applications which does this e.g https://usehover.com

我是基本的Android开发人员,下面是我用来运行usdd命令的代码,我相信它会得到支持

Am basic Android developer bellow is the code which i used to run ussd command and i believe is lucking support

String ussd = "*123*1*4*5" + Uri.encode("#");
startActivity(new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + ussd)));

以获取菜单5的最终输出,但没有用,此外,我还尝试了 https://gist.github.com/posei/1e5ae219329aa1015d3c55c3982352c5 效果不佳

to get final output of menu 5 but didn't work, in additional i also tried https://gist.github.com/posei/1e5ae219329aa1015d3c55c3982352c5 which is not working as well

在单个调用中传递多个USSD命令

交互式usd会话(多步)不适用于android 8(Oreo)

我想问是否有人知道如何做到这一点,或者有什么可以用来解决这个问题的解决方案.

I like to ask if there is anyone who knows how to do this or any solution which can be used to solve this.

谢谢

推荐答案

不幸的是,Google在Oreo中添加的API仅适用于USSD服务,您可以在开始时拨打整个USSD代码并获取响应,而无需输入任何内容会议.他们显然没有意识到,大多数电信公司出于安全原因都阻止了这种情况.

Unfortunately the API that Google added in Oreo only works for USSD services where you can dial the entire USSD code at the start and get back the response without entering anything into the session. What they apparently don't realize is that most telcos prevent this for security reasons.

您提到的我的公司悬停开发了一个Android SDK,以便您可以在自己的应用中使用此功能自己的应用.您提供的拨号方法是正确的,但是对于其他步骤,我们使用Android可访问性服务来检测会话并将其输入到会话中.它可能非常繁琐,尤其是使其可以在各种设备和Android版本上运行.如果不使用可访问性服务,就无法获取会话响应.

My company Hover which you mentioned has developed an Android SDK so that you can get this functionality in your own app. What you've presented as the method for dialing is correct, but then for additional steps we use Android accessibility services to detect and enter choices into the session. It can be quite hairy, especially to make it work on various devices and Android versions. Without using accessibility services there is no way to get the session response back.

我们的工具允许您为USSD服务创建配置,然后触发会话以从您的应用程序运行.您可以传入所需的任何运行时变量.用户永远不会看到USSD会话,并且在返回响应时,会通知您的应用程序,您可以根据需要对其进行解析.它适用于Android 4.3及更高版本.

Our tool allows you to create configurations for USSD services then trigger the session to run from your app. You can pass in any runtime variables you need. The user never sees the USSD session and when the response is returned your app is notified and you can parse it as you need. It works on Android 4.3 and above.

SDK是免费集成和使用的,直到您大规模使用为止.请开始使用我们的文档.

The SDK is free to integrate and use until you hit large scale. Please see our docs to get started.

(披露:我是Hover的CTO)

(Disclosure: I am the CTO of Hover)

这篇关于在一个会话中发送USSD请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆