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
DelphiIDEShowcaseWindows

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

DelphiFiremonkeyIDEIOSOSXWindows

DelphiCon 2020 FireMonkey Sessions Available Starting November 19

AndroidC++BuilderDelphiDemoFiremonkeyWindows

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

AndroidC++BuilderCode SnippetDelphiDemoFiremonkeyIOSOSXShowcaseWindows

Powerful Cross Platform Email App Sample In Delphi 10.4.1 FireMonkey For Android And IOS

Sign up for our Newsletter and
stay informed

6 Comments

Leave a Reply