简体   繁体   中英

How to get an Android phone's IMEI number from TestComplete?

I'm writing automated tests using TestComplete. Is there a way to get an Android phone's IMEI number from TestComplete scripts?

To clarify: I'm NOT writing an Android app, so I don't have access to Android APIs.

To read IMEI you need to have following permission:

<uses-permission android:name="android.permission.READ_PHONE_STATE" />

and then call:

android.telephony.TelephonyManager.getDeviceId()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM