Android USSD code example
String ussdCode = "*" + "123" + Uri.encode("#");
startActivity(new Intent("android.intent.action.CALL", Uri.parse("tel:" + ussdCode)));
Android USSD code example
String ussdCode = "*" + "123" + Uri.encode("#");
startActivity(new Intent("android.intent.action.CALL", Uri.parse("tel:" + ussdCode)));
Android USSD code example
private Uri ussdToCallableUri(String ussd) {
String uriString = "";
if(!ussd.startsWith("tel:"))
uriString += "tel:";
for(char c : ussd.toCharArray()) {
if(c == '#')
uriString += Uri.encode("#");
else
uriString += c;
}
return Uri.parse(uriString);
}
Android USSD code example
String ussdCode = "*123#";
Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(ussdToCallableUri(ussdCode));
try{
startActivity(intent);
} catch (SecurityException e){
e.printStackTrace();
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us