I'm developing an information application for my company and when I click the button, I wanna know my phone imei number but I can't do it because it can't allow hidden code such as *#06# (# means hidden code ). how can I use # character for an auto dial? Btw I'm not input any dial number it happens in the code automatically.
Asked
Active
Viewed 1,897 times
1
-
2You should provide some specific code for us to be able to help you – Guillaume Fache Jul 10 '15 at 07:44
-
You can do it without using the USSD code. Check this http://stackoverflow.com/questions/1972381/how-to-get-the-devices-imei-esn-programmatically-in-android The benefit is that you can use the result in your application. If dialing is a requirement you can simply send an intent with action CALL and the encoded number as param. However I don't think that you can receive the result in your app with this method – nax83 Jul 10 '15 at 08:29
-
possible duplicate of [Programmatically enter secret code like \*#\*#4636#\*#\* on Android](http://stackoverflow.com/questions/9769166/programmatically-enter-secret-code-like-4636-on-android) – Matthew Read Aug 26 '15 at 14:41
1 Answers
0
you need to use TelephonyManager for this and use the permission READ_PHONE_STATE
you can find complete code from here

Community
- 1
- 1

Ram Mandal
- 1,899
- 1
- 20
- 35