top

Using the Samsung TV Remote App

Published 2014-10-27 | (Compatible with SDK 3.5,4.5,5.0,5.1 and 2012,2013,2014 models)

Using the Samsung Remote App (optional)

Samsung Smart TV supports the use of convergence using the optional Samsung TV Remote App. You can download the Samsung Remote App from Samsung Apps (TV applications or Android applications).

When the Samsung TV Remote App is used with a Smart TV Application

  1. Samsung TV Remote App launches the application.
  2. When the application is executed, it sends some information to Samsung TV Remote App.
  3. After receiving information from the application, Samsung TV Remote app launches the corresponding mobile application.

TV Application

In order to use Samsung TV Remote App, you must implement the following code in your index.html and JavaScript files:

CustomSample.js

//...
function Tutorial_onLoad() {
    sf.service.SmartRemote.init (function() {
	// initialize completed 
    });
    var xmlObj = sf.service.SmartRemote.parse();
    //...
}

XML Data Description

The table below provides an XML Data description for both the Android and iOS versions of the Samsung TV Remote App.

Tag Description
<relativeApp> Android: Use this tag to launch a third party application.
<target>

Target mobile device

  • Android: Android device
  • iOS: iPhone, iPad
<appinfo> Application Information.
<appID>
Android : Application package ID checked to see whether or not the application is installed on the mobile device. This ID is used by the Android market.
iOS: Custom URL required for launching the application.
<fullEntryPoint>
Android : Entry activity name, including package name, used when launching the application on the mobile device.
If this value exists, then <entryPoint> is ignored.
This value requires the full activity path, including the package name.
Example: com.example.thirdparty.Main
<entryPoint>
Android : Entry activity name used when launching the application on the mobile device. This value is used if <fullEntryPoint> is unused.
When combinded with <appID>, use the syntax:
  • $<appID>.$<entryPoint>
Example: Main
iOS : App URL used by the app store.
<version>
Android : Version code used to check for updates. If updates are required, link to the android market.
iOS : Not used.

The table below illustrates the use of the xml data that is used as follows:

sbuffer="<bgInformation>
            <relativeApp>
                <target>android</target>
                <appInfo>
                    <appID>com.samsung.thirdparty</appID>
                    <fullEntryPoint>com.example.thirdparty.Main</fullEntryPoint>
                    <entryPoint>Main</entryPoint>
                    <version>45</version>
                </appInfo>
            </relativeApp>
        </bgInformation>";
XML Data Preview

Android Case:

<bgInformation>
    <relativeApp>
        <target>android</target>
        <appInfo>
            <appID>com.example.thirdparty</appID>
            <fullEntryPoint>com.example.thirdparty.Main</fullEntryPoint>
            <entryPoint>Main</entryPoint>
            <version>45</version>
        </appInfo>
    </relativeApp>
</bgInformation>

Android:

iOS Case:

   <bgInformation>
       <relativeApp>
           <target>ios</target>
               <appInfo>
               <appID>todolist://</appID>
            <entryPoint>http://URL</entryPoint>
        </appInfo>
    </relativeApp>
</bgInformation>

iOS:

In <appID>, add the custom URL schema to launch the application.
In the example below, the custom URL schema is a todolist and the URL is todolist://options.
For a detailed example, see this document 99 page Implementing Custom URL Schemes in the iOS Developer Library.

To implement Samsung TV Remote App, add app store app URL to the <entryPoint> tag:

  • http://itunes.apple.com/us/app/samsung-remote/id359580639?mt=8

Mobile Application

When Samsung Remote app launches the corresponding mobile application, Mobile application can connect to TV App automatically using IP address and MAC of TV received from Samsung Remote App. TVIP_ADDR is IP Address of connected TV with the Remote App and TVMAC_ADDR is MAC of connected TV with the Remote App.

Note

This code is only for Android.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Intent intent = getIntent();
    String ipAddr = intent.getStringExtra("TVIP_ADDR");
    String macAddr = intent.getStringExtra("TVMAC_ADDR");
    //...
    //...
}