Call (and get the response for) a USSD Code, in the background?

后端 未结 6 1717
野性不改
野性不改 2020-12-05 18:30

I\'m wanting to write a widget displays the users\' prepay balance, remaining data etc.

I\'m thinking of automatically calling the USSD code which returns this data

6条回答
  •  無奈伤痛
    2020-12-05 19:19

    I'm not completely sure but I think USSD is not yet supported on android, however you can try this workaround:

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

提交回复
热议问题