How do know the device phone number.
-
I am developing android SW using QML and Qt, and need to Phone number for this device
-
Afaik there is currently no QML-based API for retrieving the phone number, so you need to use JNI to obtain the number from Android's
TelephonyManager
Java class.You can then use it in your QML code by either registering it as a context property in the engine or with the help of a custom
QQuickItem
. -
Thank you, solved ^^