problem description
now I use the official website of H5+MUI+vue developers to get MAC addresses that are not easy to use, either to report an error or to report an error or to report an error. This is not an actual address at all, so I want to ask the great god how to get it. I don"t know much about NJS. I can"t query
.the environmental background of the problems and what methods you have tried
tried it all
related codes
/ / Please paste the code text below (do not replace the code with pictures)
function getMac() {
var Context = plus.android.importClass("android.content.Context");
var wifiManager = plus.android.runtimeMainActivity().getSystemService(Context.WIFI_SERVICE);
var wifiInfo = plus.android.invoke(wifiManager, "getConnectionInfo");
var mac = plus.android.invoke(wifiInfo, "getMacAddress");
alert(mac);//02:00:00:00:00
}