Hi,
I have tried to use Web Service inside SSSP6, but it is not working.
I’ve already config config.xml
<!-- Web Service -->
<tizen:feature name="http://tizen.org/feature/web.service"/>
<tizen:service id="id.Service" type="ui">
<tizen:content src="dist/service/index.js"/>
<tizen:name>WebService</tizen:name>
<tizen:description>WebService</tizen:description>
</tizen:service>
in the index.html
<script type="module">
const pkg_id = tizen.application.getCurrentApplication().appInfo.packageId;
const service_id = pkg_id + ".Service";
console.log('service id = ', service_id);
const my_service = new Service(service_id);
my_service.start().then(function() {
console.log("Succeeded to start service");
// alert("Succeeded to start service");
}, function(error) {
console.log("Failed to start service: " + error);
// alert("Failed to start service: " + error);
});
</script>
I also have tried only console.log
inside <script type="module
but it is not executed, I’ve checked chrome version with caniuse, it seems script type module is not supported in Chrome 53 (SSSP6).
So I do try to require it manually from js which will be transpiled later by
require('wrt:service')
But still have found that wrt:service
is not defined or found.
Where can I get wrt:service
install as my npm module? or make it work?