0

I have created an html page that I will open on an android smart TV. How can I get any unique value such as hardware key of this TV with javascript? Any value such as mac address, hardware id, serial number will be enough for me.

Edit to be understood :

Actually I have content manager for digital signage. But this app working on android app player. I developed browser based web player. however, I am trying to produce a solution without the need to create a structure such as login in order to authorize the smart televisions that will play these contents and to prevent the contents from being accessed from anywhere. For this reason, I want to make a match between the sitting televisions and the url. For example, the xyz.com url seems to be accessible only from the device with device id A1234. However, when I think about it carefully, it would be an insult to users' privacy for the browser to do this. So I guess I will define static ip addresses.

2 Answers2

1

Obtaining unique hardware identifiers like the MAC address, hardware ID, or serial number of an Android smart TV through a web page using JavaScript can be challenging and may not be possible due to security and privacy restrictions. Accessing such information can pose privacy and security risks, so most modern browsers on Android devices, including smart TVs, restrict access to sensitive hardware-related data for websites.

If you need access to such information for a legitimate purpose, you might need to explore other approaches:

  1. Native Application: If you have control over the TV or can create a dedicated app for it, you can access device-specific information more easily through native code (Java or Kotlin for Android).
  2. Device Management APIs: Some Android smart TVs might offer device management APIs that can be accessed using the appropriate permissions and APIs.
  3. Manufacturer or Vendor Support: Reach out to the manufacturer or vendor of the Android smart TV for guidance on how to obtain specific information programmatically.
1

Just a suggestion

If you want just a unique identity to distinguish or something and you respect users network privacy, IP address is also an unique key/Id.

More about how to access IP address in JS refer this

How to get client's IP address using JavaScript?