在 Android 中通过 USSD 发送文本数据 [英] Sending text data via USSD in Android

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

问题描述

是否有可能在 android 中通过 USSD 发送文本数据?

Is there a possibility to send text data via USSD in android?

我发现的唯一方法是调用 android.intent.action.CALL 意图并在如下之后附加文本数据

The only way I found was to invoke an android.intent.action.CALL intent and append the text data after as follows

tel:#(短代码)(书签)(页数)(页码)(MSISDN)*(文本数据)#例如电话:#161*129*1*1*5555*(文本数据)#

tel:#(short code)(bookmark)(number of pages)(page number)(MSISDN)*(text data)# e.g. tel:#161*129*1*1*5555*(text data)#

但是一旦我附加了文本数据 &启动 ACTION_CALL 但文本数据将转换为键盘代码.

But once I append text data & start the ACTION_CALL but the text data will be converted into keypad codes.

即 ACL = 225.

That is ACL = 225.

有没有其他方法可以在不将文本转换为键盘代码的情况下在 USSD 呼叫中搭载文本数据?

Is there any other way to piggy back text data on an USSD call without getting the text converted into keypad codes?

推荐答案

OutgoingCallReceiver 使用以下 2 种方法转换文本数据:PhoneNumberUtils.convertKeypadLettersToDigits 和 PhoneNumberUtils.stripSeparators使用 ACTION_CALL 意图没有办法阻止它发生.我希望有一种方法可以使用内部库直接发送USSD,但不知道如何实现...

OutgoingCallReceiver convert text data using these 2 methods: PhoneNumberUtils.convertKeypadLettersToDigits and PhoneNumberUtils.stripSeparators Using ACTION_CALL intent there is no way to prevent it happened. I hope there is a way to use internal library to send USSD directly, but have no idea how to achieve it...

这篇关于在 Android 中通过 USSD 发送文本数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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