Reputation: 2687
How can I get the MAC address a from Samsung Smart TV in JavaScript?
I tried the code below but nothing happens:
function getMAC() {
var mac = null;
try {
mac = webapis.network.getMac();
} catch (e) {
addResult("getMAC exception [" + e.code + "] name: " + e.name
+ " message: " + e.message);
}
if (null != mac) {
addResult("[getMAC] mac: " + mac);
}
}
Upvotes: 2
Views: 1953
Reputation: 1174
<tizen:privilege name="http://developer.samsung.com/privilege/network.public"/>
And... I think you already make the addResult
function but just make it if you don't.
Upvotes: 1