开发者

USSD on Android from applications

开发者_如何学编程Is it possible to send and receive response on USSD requests? I've googled this question and i found that this issue isn't implemented yet:

http://code.google.com/p/android/issues/detail?id=1285

Is there any ways do process USSD requests for Android applications?


Currently Android is missing support for developers to interact with USSD/MMI. Sending USSD request is easy as suggested by Terence but there's no easy way to handle the incoming USSD response.

As far as i know, currently there are two approaches to follow if you want to interact with the response.

  1. Extracting it from the Logs
  2. or Using the hidden interface - 'com.android.internal.telephony.IExtendedNetworkService' .

The interface is hidden in the telephony package and you need to create aidl of it and include in your project.

here is an example to get you started ..

http://commandus.com/blog/?p=58


Use this USSD Interceptor found on GitHub.

Project description states that it's:

USSD Interceptor is an Android service that allows intercepting and receiving USSD calls text results and re-broadcasting them for any listeners.

Link: github.com/alaasalman/ussdinterceptor


Sending USSD is easy

startActivityForResult(new Intent("android.intent.action.CALL",
   Uri.parse("tel:*123" + Uri.encode("#"))), 1);

Here's a code snippet which should help you with the response. It reads the logs to get the response. From http://codepaste.ru/7545/#

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜