Jomon KC
Jomon KC

Reputation: 55

Uniquely identify Android Emulators

I installed emulators(sdk) on different different systems, and all are connected to one server. All emulators are build by the same set of code and resources. I need to identify these emulators uniquely for testing purpose. I tried to get system username, but it is empty string kw.

For actual devices, we can get IMEI number. But for emulators, is there a way exists? I know it is a strange doubt. Please share some tips about this.

Thanks in advance, Joe

Upvotes: 1

Views: 893

Answers (2)

inazaruk
inazaruk

Reputation: 74790

You have a controlled environment. You can create file on each emulator with generated UUID in it. And then read that UUID in your application and send that to server.

Also your application can check whether such UUID file exists, and if not create it. In this case no prior setup of emualtors is needed.

This should solve your issue without relying on ANDROID_ID and similar approaches. You can even extend this approach to real devices.

Upvotes: 0

Mykhailo Gaidai
Mykhailo Gaidai

Reputation: 3160

Actually Android devices don't always have IMEI(for example, tablet don't). Take a look at the blog entry for using UUID for identification.

Upvotes: 2

Related Questions