I'm new to Android STB framework development. I want to get MAC address to my vendor android application. My Android STB version is Android 12.
As per Google official release note we can able to get MAC address only in privilaged application permissions.
In addition, non-privileged apps can't access the device's MAC address; only network interfaces with an IP address are visible. This impacts the getifaddrs() and NetworkInterface.getHardwareAddress() methods, as well as sending RTM_GETLINK Netlink messages.
Please give me a sample or any inputs for getting MAC address.
In TVSettings app is getting MAC address. Its working fine but I can't get from vendor application.
Please share me a code if you already getting the mac address in ATV12 or ATV11.
Advance thanks.