How do I get Tizen's B2B API working on the emulator? I want this for a TV

1.1k views Asked by At

I'm just getting started with Tizen so I hope this is an easy noobie question, but it's got me stumped. I'm using the emulator T-samsung-5.5-x86. I'm trying to use Tizen's B2B API with this on my HTML page:

<script type="text/javascript" src="$B2BAPIS/b2bapis/b2bapis.js"></script>
<script src="$WEBAPIS/webapis/webapis.js"></script>
    
<link rel="stylesheet" type="text/css" href="css/style.css"/>

And this in my code:

var speakerType = b2bapis.b2bcontrol.getSpeakerType();

When it runs it gives me this error when hovering over b2bapis:

ReferenceError: b2bapis is not defined

Also, in my Console, it says: b2bapis.js - Failed to load resource.

webapis works fine for me.

2

There are 2 answers

1
CY19 On

Oh well, jeez... So the B2BAPIS apparently aren't something that are working on the emulator (at least not mine) but once I connected to a Samsung TV work just fine. Guess I just got by my first noob hurdle...

0
Kennaruk On

Just want to note here what I found. b2bapis is working only on real smart TV not emulators.

Make sure you have added this import in your index.html

<script type="text/javascript" src="$B2BAPIS/b2bapis/b2bapis.js"></script>

also privilege in your config.xml eg. b2bapis.b2bcontrol importing this

<tizen:privilege name="http://developer.samsung.com/privilege/b2bcontrol"/>