Get device’s IMEI in Android app development

Here’s the content of my MainActivity class where I log the IMEI of my test device.

You also need to add this permission to your AndroidManifest.xml file:

Place it inside the <manifest></manifest> tag, but same level as <application></application>.

Source: How to get the device’s IMEI/ESN programmatically in android?

Catzie

A Filipino who is a mobile & web developer on weekdays, and a baker on weekends. When I have time to spare, I blog, play video games, watch series (usually anime), cook dishes, draw, or spend a little time with pets. I also like traveling and recording song covers, but I only do so occasionally. Follow on Twitter: @catzie

Leave a Reply

Your email address will not be published. Required fields are marked *