Get Wifi Mac

Permission

The application declares the following permissions in the manifest:

 android.permission.WIFI

API Overview

byte[] getWifiMac();

Get Mac of Wifi.

Returns

byte[]

Mac array.

Resource Download

  • Refer to the cloudpos apidemo - demo

Snippet code

private ISystemDevice device;
if (device == null) {
  device = POSTerminalAdvance.getInstance().getSystemDevice();
}
device.open(context);
device.getNetworkManager().open(context);
device.getNetworkManager().getWifiManager().open(context);
byte[] wifiMacByte = device.getNetworkManager().getWifiManager().getWifiMac();
device.getNetworkManager().getWifiManager().close();
device.getNetworkManager().close();
device.close();

Resource Download

  • Refer to the cloudpos apidemo - demo

Last updated