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:
userAgent
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)
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.
$(DEVICE_TYPE)
“SMART-TV”
$(PLATFORM) $(PLATFORM_VER)
“Tizen xxx”
$(COMPANY_NAME)
“SAMSUNG”
$(MODEL_NAME)
“sdk”
“Version/xxx”
$(UX_RECOMMENDED)
“TV”
Table 1. User agent field values
The user agent strings for Samsung TVs are listed in the following table according to Tizen version and year models.
Mozilla/5.0 (SMART-TV; LINUX; Tizen 6.5) AppleWebKit/537.36 (KHTML, like Gecko) 85.0.4183.93/6.5 TV Safari/537.36
Mozilla/5.0 (SMART-TV; LINUX; Tizen 6.0) AppleWebKit/537.36 (KHTML, like Gecko) 76.0.3809.146/6.0 TV Safari/537.36
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
Mozilla/5.0 (SMART-TV; LINUX; Tizen 5.0) AppleWebKit/537.36 (KHTML, like Gecko) Version/5.0 TV Safari/537.36
Mozilla/5.0 (SMART-TV; LINUX; Tizen 4.0) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 TV Safari/537.36
Mozilla/5.0 (SMART-TV; LINUX; Tizen 3.0) AppleWebKit/538.1 (KHTML, like Gecko) Version/3.0 TV Safari/538.1
Mozilla/5.0 (SMART-TV; Linux; Tizen 2.4.0) AppleWebKit/538.1 (KHTML, like Gecko) Version/2.4.0 TV Safari/538.1
Mozilla/5.0 (SMART-TV; Linux; Tizen 2.2) AppleWebkit/538.1 (KHTML, like Gecko) SamsungBrowser/1.0 TV Safari/538.1
Mozilla/5.0 (SmartHub; SMART-TV; U; Linux/SmartTV+2014; Maple2012) AppleWebKit/537.42+ (KHTML, like Gecko) SmartTV Safari/537.42+
Mozilla/5.0 (SmartHub; SMART-TV; U; Linux/SmartTV+2013; Maple2012) AppleWebKit/535.20+ (KHTML, like Gecko) SmartTV Safari/535.20+
Mozilla/5.0 (SmartHub; SMART-TV; U; Linux/SmartTV; Maple2012) AppleWebKit/534.7 (KHTML, like Gecko) SmartTV Safari/534.7
Table 2. User agent strings for Samsung TVs
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);