Wassim Benhamida
Wassim Benhamida

Reputation: 2687

Samsung Smart TV address MAC

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

Answers (1)

pius lee
pius lee

Reputation: 1174

  1. Check you TV is running on Tizen.
  2. Check config.xml has <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

Related Questions