RESTful service on emulator

2019-09-15 11:23发布

问题:

I use RESTful service on Tizen emulator , this service works on android simulator but dose not work on Tizen emulator , How Can I test RESTful service on emulator in general? What are the possible issues for this problem ? I use visual studio 2017 Thanks

回答1:

As you are using Visual Studio for Tizen Development, i am assuming that you are developing Tizen.NET app.

You have go give internet privilege to allow the app to consume a web service. Add the privilege from tizen-manifest.xml Privileges section.

<manifest>
  .....
  .....
  <privileges>
     <privilege>http://tizen.org/privilege/internet</privilege>
  </privileges>
</manifest>


回答2:

If you are using Tizen Studio, for security reasons, you need to give permissions to the url of your RESTful service. It's very simple, you need to add this line to your config.xml:

<tizen:metadata key="http://samsung.com/tv/metadata/use.preview" value="endpoint_URL=https://your.url"/>

Check too if you have this additional permissions in your Config.xml:

<tizen:privilege name="http://tizen.org/privilege/internet"/>

Please, try it