How is it possible to do USSD requests on Android?

前端 未结 5 577
别跟我提以往
别跟我提以往 2020-11-27 17:31

Some custom dialer apps (for example, Dialer from MotoBlur) are able to do USSD requests. Is it realy impossible to do this via SDK?

5条回答
  •  春和景丽
    2020-11-27 17:46

    hope it work for you:

    String suffix = Uri.encode("#");
    String ussd = suffix+"919"+"*"+number+suffix;
    
    Intent callIntent = new Intent(Intent.ACTION_CALL);
    callIntent.setData(Uri.parse("tel:"+ ussd));
    startActivity(callIntent);
    

提交回复
热议问题