언어 설정

Menu
Sites
Language
Send data Tizen Web Simulator to localhost web

Hello, I can not send data from Tizen web simulator application (Samsung tv) with tizen studio to a local page with mamp.

I do not know how to look at the ip of the configuration of my emulator. I have tried webSocket but I can not get it.

Can somebody help me?

Thank you!

Responses

1 댓글
Armaan-Ul- Islam

You can check the ip using this piece of code:

.js

$(document).ready(function () {
    $.getJSON("http://jsonip.com/?callback=?", function (data) {
        console.log(data);
        alert(data.ip);
    });
});

index.html

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>

 

But this would show you the Public IP that your PC uses to reach Internet, Which is logical, cause:

 

Tizen Web Simulator is not actually an emulator/virtual device with dedicated memory and all that stuff. Rather it is a Browser with TV screen resolution and some TV remote event handlers, which loads the html file from your Tizen-Studio workspace like:

file:///home/ALVARO_Aguilar/workspace/testProject/index.html

 

Web Simulator Ref.

What you may try is to send data from your tizen app to MAMP server running on localhost (127.0.0.1) using XMLHttpRequest/ajax or any other means.