give me solution ?
Why do you even need it?
im work on startup about sell mobile phone like a shop and they want to android app retrieve IMEI and then send to server to authenticate it .
Have you tried this? https://stackoverflow.com/questions/1972381/how-to-get-the-devices-imei-esn-programmatically-in-android
yes . it is throw security exception
telephonyManager.getDeviceID()
For this call you must define uses-permission in manifest and also request it at runtime as it is dangerous permission. Have you done this?
I am from Iran and when I wanna get the imei of the phone , I dial *#06# I don't know if you can use the same code in your country or not... You can test it. And please reply if you tested it 🙏
I think the country doesn't matter
Yeah it'll be better to test
I know ! But i want to retrieve imei by my application . Solution is not important just application show imei to user
You can with TelephonyManager
So for this , you need to search for a way to get the result of ussd code. This might be helpful.
That is a good way but i checked this way and the TelephonyManager return failure code instead of USSD content .
Unfortunately, i dont know more about it...🙏
Обсуждают сегодня