Welcome to Headwind MDM Q&A, where you can ask questions and receive answers from other members of the community.

Please do not post bug reports, missing feature requests, or demo inquiries. If you have such an inquiry, submit a contact form.

0 votes
Is it possible to send custom data from the device, for example, MAC address?
by (25.2k points)

1 Answer

0 votes

Headwind MDM can receive and display up to 3 custom parameters from the device. See details how to configure these parameters in the web panel here: https://qa.h-mdm.com/16711/

However, to colllect custom data and deliver them to the web panel, you need to change the source code of the mobile agent. You need to fork the project: https://qa.h-mdm.com/1918/

The piece of code to be changed is: app/src/main/java/com/hmdm/launcher/pro/util/DeviceInfoProvider.java, method getDeviceInfo(). The structure DeviceInfo has methods setCustom1(), setCustom2(), setCustom3() which could be used to send custom data to the server.

To get the MAC address, you need to use the method: DevicePolicyManager.getWifiMacAddress(): https://developer.android.com/reference/android/app/admin/DevicePolicyManager#getWifiMacAddress(android.content.ComponentName)

Note: there's another (legacy) method WifiInfo.getMacAddress() which doesn't work because it requires system permissions.

by (25.2k points)
...