Testinium / MobileDeviceInfo

Apache License 2.0
36 stars 20 forks source link

Improvement - Retrieve device phone number? #3

Closed mjordanBetBright closed 5 years ago

mjordanBetBright commented 5 years ago

Hello all,

I was wondering if you could pull the connected device's phone number as well? Real Devices and Simulators. This would be beneficial for testing when phone numbers need to be used to register accounts. Normally people will create pools of numbers to use and reuse but if you could just use the number of the connected device (because you know that number cannot already be in use), it would be really beneficial.

Let me know what you think.

Thanks, Mark.

mjordanBetBright commented 5 years ago

It appears you may need root access for this unfortunately

bahadirustun commented 5 years ago

Hey, Mark. As you said, we cannot access this data because it requires root operation. The purpose of this library is to dynamically capture the features for real devices. If necessary, the "getIntegratedCircuitCardIdentity" command returns the ID number of the SIM card installed on the device. Because this value is constant, you can keep a list and match it with phone numbers.

mjordanBetBright commented 5 years ago

Thanks for the response, really appreciate it 👍