When I dial *#06# on my phone the IMEI is displayed. Fine.
But when I use this kind of code :
String imei="*#06#";
Intent cintent= new Intent(Intent.ACTION_DIAL, Uri.parse("tel:"+Uri.encode(imei)));
startActivity(cintent);
(or ACTION_CALL instead of ACTION_DIAL)
... the USSD code is displayed correctly on the dialer (*#06#). But even if I click call the IMEI never shows up (error : "Connection problem or invalid MMI code").
I've been through other similar topics, but found no solution and can't figure how to make it work (my phone is running Android 4.4.4).
Note that I don't want to get the result of the USSD, just have it executed somehow.If it is possible...
Thanks for your help !