Hello devs,

I need to correctly be able to differentiate between emulator
instances. I know it's easily done with real devices. With real
devices, you can use getDeviceId or getLine1Number from
TelephonyManager. With emulators, all the instances have the same
device id, same subscriber id, and same line1 number. Is there a way
to differentiate them? Using NetworkInfo, I can call the toString
method and I get my ip and the port on the computer. The problem with
that is that the port is always different. I would like something more
stable. Like when you use "adb devices" in command line. Emulator #1
is almost always "emulator-5556" and emulator#2 is almost always
"emulator-5554". Is there a way to get the same info I get from "adb
devices" in my code? If not, is it possible to use a command line
parameter to force the emulator to use a certain phone number?

Thank you.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to