开发者

Uniquely identify Android Emulators

I installed emulato开发者_JS百科rs(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


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜