Unsolved I need to get a serial number of device
-
Good day for all. Sorry any error on my english, but, my natural language is spanish. I have started to program in qt target to android early, then I have a personal project that need to get a serial number of the device, any cell or table. The problem is that I don't have idea about how to do that. Thanks any suggestion or advise.
-
@zealot2 what about this? Please note this is Java code (place it in your Android activity)::
public static String getDeviceId(Context context) { final String deviceId = ((TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE)).getDeviceId(); if (deviceId != null) { return deviceId; } else { return android.os.Build.SERIAL; } }
taken from here
-
You can also have a look at V-Play Engine, which offers to access device information such as model identifier or a unique device id.
-
@Pablo-J.-Rogina how to call this from Qt C++ application?
-
@Aleksey_K-0 you may want to take a look at QAndroidJniObject class, and also check this question in stackoverflow