<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://nielsentest.mywikis.net/w/index.php?action=history&amp;feed=atom&amp;title=updateOTT%28%29</id>
	<title>updateOTT() - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://nielsentest.mywikis.net/w/index.php?action=history&amp;feed=atom&amp;title=updateOTT%28%29"/>
	<link rel="alternate" type="text/html" href="https://nielsentest.mywikis.net/w/index.php?title=updateOTT()&amp;action=history"/>
	<updated>2026-04-18T07:12:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.5</generator>
	<entry>
		<id>https://nielsentest.mywikis.net/w/index.php?title=updateOTT()&amp;diff=415&amp;oldid=prev</id>
		<title>Admin: Created page with &quot;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|Android SDK API Reference}} {{CurrentBreadcrumb}} Category:Digital Category:Android SDK API Reference Use &lt;code&gt;upd...&quot;</title>
		<link rel="alternate" type="text/html" href="https://nielsentest.mywikis.net/w/index.php?title=updateOTT()&amp;diff=415&amp;oldid=prev"/>
		<updated>2017-05-21T07:29:08Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|Android SDK API Reference}} {{CurrentBreadcrumb}} &lt;a href=&quot;/wiki/Category:Digital&quot; title=&quot;Category:Digital&quot;&gt;Category:Digital&lt;/a&gt; &lt;a href=&quot;/wiki/Category:Android_SDK_API_Reference&quot; class=&quot;mw-redirect&quot; title=&quot;Category:Android SDK API Reference&quot;&gt;Category:Android SDK API Reference&lt;/a&gt; Use &amp;lt;code&amp;gt;upd...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Breadcrumb|}} {{Breadcrumb|Digital}} {{Breadcrumb|Android SDK API Reference}} {{CurrentBreadcrumb}}&lt;br /&gt;
[[Category:Digital]]&lt;br /&gt;
[[Category:Android SDK API Reference]]&lt;br /&gt;
Use &amp;lt;code&amp;gt;updateOTT&amp;lt;/code&amp;gt; method to notify App SDK that the remote OTT device (like Google ChromeCast, Roku, Amazon FireTV, etc.) is connected / disconnected (change of OTT status).&lt;br /&gt;
*When OTT device is connected, call &amp;lt;code&amp;gt;updateOTT&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;&amp;quot;ottStatus&amp;quot;: &amp;quot;1&amp;quot;&amp;lt;/code&amp;gt; and a set of OTT device related parameters in &amp;lt;code&amp;gt;ottInfo&amp;lt;/code&amp;gt; JSONObject.&lt;br /&gt;
*When OTT device is disconnected, call &amp;lt;code&amp;gt;updateOTT&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;&amp;quot;ottStatus&amp;quot;: &amp;quot;0&amp;quot;&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;ottInfo&amp;lt;/code&amp;gt; JSONObject.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
public void updateOTT(JSONObject ottInfo)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Input Parameters ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Parameter !! Description&lt;br /&gt;
|-&lt;br /&gt;
| ottMetadata&lt;br /&gt;
| A JSON object with the following parameters&lt;br /&gt;
'''OTT device is connected'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
new JSONObject()&lt;br /&gt;
   .put(&amp;quot;ottStatus&amp;quot;: &amp;quot;1&amp;quot;)&lt;br /&gt;
   .put(&amp;quot;ottType&amp;quot;: &amp;quot;casting&amp;quot;)&lt;br /&gt;
   .put(&amp;quot;ottDevice&amp;quot;: &amp;quot;chromecast&amp;quot;)&lt;br /&gt;
   .put(&amp;quot;ottDeviceName&amp;quot;: &amp;quot;Google ChromeCast&amp;quot;)&lt;br /&gt;
   .put(&amp;quot;ottDeviceID&amp;quot;: &amp;quot;xxxx-xxxx-xxxx&amp;quot;)&lt;br /&gt;
   .put(&amp;quot;ottDeviceManufacturer&amp;quot;: &amp;quot;Google&amp;quot;)&lt;br /&gt;
   .put(&amp;quot;ottDeviceModel&amp;quot;: &amp;quot;ChromeCast&amp;quot;)&lt;br /&gt;
   .put(&amp;quot;ottDeviceVersion&amp;quot;: &amp;quot;1.0.0&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''OTT device is disconnected'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
new JSONObject()&lt;br /&gt;
   .put(&amp;quot;ottStatus&amp;quot;: &amp;quot;0&amp;quot;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
See [[International Metadata]] (Germany).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Output Parameters ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Output Parameters (Return value) !! Description&lt;br /&gt;
|-&lt;br /&gt;
| Void || &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
*Every time when application is launched or moving to foreground, call &amp;lt;code&amp;gt;updateOTT&amp;lt;/code&amp;gt; to report the current OTT status to the App SDK.&lt;br /&gt;
*The application needs to report all the possible OTT types (casting, screen mirroring, and any other types) to App SDK.&lt;br /&gt;
&lt;br /&gt;
=== Communicating with the Chromecast Receiver App ===&lt;br /&gt;
SDK cannot communicate directly with the Receiver App running on the Chromecast as it needs access to the Google Casting framework. Alternatively, App SDK requires the application to pass the data to the Receiver App. The application should:&lt;br /&gt;
*Retrieve the Opt-Out status on the device (using [[getOptOutStatus()]]) and its Demographic ID (using [[getDemographicId()]])&lt;br /&gt;
*Relay the retrieved details / values to the Receiver App, as additional parameters in &amp;lt;code&amp;gt;MediaMetadata&amp;lt;/code&amp;gt; payload.&lt;br /&gt;
**Create the metadata information for this purpose, using &amp;lt;code&amp;gt;MediaMetadata&amp;lt;/code&amp;gt;.&lt;br /&gt;
The two custom parameters to be included in &amp;lt;code&amp;gt;MediaMetadata&amp;lt;/code&amp;gt; are:&lt;br /&gt;
*&amp;lt;code&amp;gt;kGCKMetadataNlsKeyDeviceID&amp;lt;/code&amp;gt; for device ID.&lt;br /&gt;
*&amp;lt;code&amp;gt;kGCKMetadataNlsKeyOptout&amp;lt;/code&amp;gt; for Opt-out status (0 or 1).&lt;br /&gt;
Below is a sample code snippet on how the application should retrieve and relay the information from App SDK to Receiver App.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
MediaMetadata mediaMetadata = new MediaMetadata( MediaMetadata.MEDIA_TYPE_MOVIE );&lt;br /&gt;
mediaMetadata.putString( MediaMetadata.KEY_TITLE, channelName.getText().toString());&lt;br /&gt;
&lt;br /&gt;
//Custom parameters&lt;br /&gt;
mediaMetadata.putString( MEDIA_METADATA_KEY_DEVICE_ID, mAppSdk.getDemographicId() );&lt;br /&gt;
mediaMetadata.putString( MEDIA_METADATA_KEY_OPTOUT_STATE, mAppSdk.getOptOutStatus() ? “1”:”0″);&lt;br /&gt;
&lt;br /&gt;
MediaInfo mediaInfo = new MediaInfo.Builder(mNowPlayingUrl)&lt;br /&gt;
            .setContentType( getString( R.string.content_type_mp4 ) )&lt;br /&gt;
            .setStreamType( MediaInfo.STREAM_TYPE_BUFFERED )&lt;br /&gt;
            .setMetadata( mediaMetadata )&lt;br /&gt;
            .build();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>