Get access to over 100 FireMonkey cross platform samples for Android, IOS, OSX, Windows, and Linux!

AndroidAppmethodCode SnippetDelphiFiremonkey

Read The IMEI Device ID With Delphi XE5 Firemonkey On Android

Delphi XE5 Firemonkey Android IMEIHere is a code snippet which gets the Android device IMEI for you using the Android JNI. The IMEI (International Mobile Equipment Identity)┬áis a unique device ID separate from your SIM card. Accessing the IMEI also requires that your app has the READ_PHONE_STATE permission to be able to access it. I’m not sure who wrote the original example code but on the Embarcadero forum┬áRemy Lebeau posted this code snippet in October of 2013. Here is the full permission line for the Android manifest:

And here is the code snippet:

There are also two other blog posts with slightly different code for retrieving the IMEI on Android with Delphi XE5 Firemonkey here and here.

Head over to the Embercadero forum to read the full thread about getting the IMEI on Android.


Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

Related posts

FireMonkey 10.4.2 Features Updated iOS 14, Android 11, And macOS 11 Support Plus Hundreds Of Fixes


Ryzen 9 5950x: One Billion Lines Of Delphi Code Compiled In ~5 Minutes On 16 Cores


DelphiCon 2020 FireMonkey Sessions Available Starting November 19


Powerful Commercial Gorilla3D Framework Upgraded For Delphi FireMonkey On Windows And Android

Sign up for our Newsletter and
stay informed


Leave a Reply