Retrieving Platform Information
This topic describes how to retrieve platform information from a Samsung TV.
Some API specifications and features vary in implementation between Samsung TV model groups. To ensure that your application runs on various TV models, you need to retrieve the TV platform information and implement your application features accordingly.
You can retrieve TV platform information in 3 ways:
-
Using the Web standard Navigator interface, retrieve the user agent string for the device with the
userAgent
property:var userAgent = navigator.userAgent console.log(userAgent);
The user agent string has the following structure:
Mozilla/$(MOZILA_VER) ($(DEVICE_TYPE); $(OS); $(PLATFORM) $(PLATFORM_VER) $(COMPANY_NAME) $(MODEL_NAME)) AppleWebKit/$(APPLEWEBKIT_VER) (KHTML, like Gecko) $(APP_NAME)/$(APP_VER) $(UX RECOMMENDED) Safari/$(SAFARI_VER)
The following table lists the user agent string fields that have distinctive values for Samsung TVs.
Table 1. User agent field values Field Value Requirement $(DEVICE_TYPE) “SMART-TV” Optional $(PLATFORM) $(PLATFORM_VER) “Tizen xxx” Mandatory $(COMPANY_NAME) “SAMSUNG” Optional $(MODEL_NAME) "sdk” for Samsung TV SDK $(APP_NAME)/$(APP_VER) Usually “Version/xxx” Mandatory $(UX_RECOMMENDED) “TV” Optional The user agent strings for Samsung TVs are listed in the following table.
Table 2. User agent strings for Samsung TVs Product User Agent 2020 models Mozilla/5.0 (SMART-TV; LINUX; Tizen 5.5) AppleWebKit/537.36 (KHTML, like Gecko) 69.0.3497.106.1/5.5 TV Safari/537.36 2019 models Mozilla/5.0 (SMART-TV; LINUX; Tizen 5.0) AppleWebKit/537.36 (KHTML, like Gecko) Version/5.0 TV Safari/537.36 2018 models Mozilla/5.0 (SMART-TV; LINUX; Tizen 4.0) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 TV Safari/537.36 2017 models Mozilla/5.0 (SMART-TV; LINUX; Tizen 3.0) AppleWebKit/538.1 (KHTML, like Gecko) Version/3.0 TV Safari/538.1 2016 models Mozilla/5.0 (SMART-TV; Linux; Tizen 2.4.0) AppleWebKit/538.1 (KHTML, like Gecko) Version/2.4.0 TV Safari/538.1 2015 models Mozilla/5.0 (SMART-TV; Linux; Tizen 2.2) AppleWebkit/538.1 (KHTML, like Gecko) SamsungBrowser/1.0 TV Safari/538.1 TV SDK 3.0 Mozilla/5.0 (SMART-TV; LINUX; Tizen 3.0) AppleWebKit/538.1 (KHTML, like Gecko) Version/3.0 TV Safari/538.1 TV SDK 2.4 Mozilla/5.0 (SMART-TV; Linux; Tizen 2.4.0; SAMSUNG sdk) AppleWebKit/538.1 (KHTML, like Gecko) Version/2.4.0 TV Safari/538.1 TV SDK 2.3.1 Mozilla/5.0 (SMART-TV; Linux; Tizen 2.4.0; SAMSUNG sdk) AppleWebKit/538.1 (KHTML, like Gecko) Version/2.4.0 TV Safari/538.1 -
Using the Samsung Product API, retrieve information about the TV, such as the firmware version and the model, with the ProductInfo API:
var firmware = webapis.productinfo.getFirmware(); console.log(firmware);
var model = webapis.productinfo.getModel(); console.log(model);
-
Using the Tizen API, retrieve the Tizen version with the SystemInfo API:
var capability = tizen.systeminfo.getCapability('http://tizen.org/feature/platform.version'); console.log(capability);