Languages

Menu
Sites
Language
Service Application error

Hi,

 

I am trying to create a service application using the guide here: https://developer.tizen.org/development/guides/web-application/tizen-features/service-application. I am using Tizen SDK 2.3.1 with partner certificate. Below is what my config.xml looks like. 

<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="http://yourdomain/MyApp" version="1.0.0" viewmodes="maximized">
    <tizen:application id="mypackage.MyApp" package="mypackage" required_version="2.3.1"/>
    <content src="index.html"/>
    <feature name="http://tizen.org/feature/screen.size.all"/>
    <feature name="http://tizen.org/feature/web.service"/>
    <icon src="icon.png"/>
    <name>MyApp</name>
    <tizen:privilege name="http://tizen.org/privilege/application.launch"/>
    <tizen:service id="mypackage.myservice" on-boot="false" auto-restart="true">
        <tizen:content src="js/service/myservice.js"/>
        <tizen:name>MyService</tizen:name>
        <tizen:icon src="icon1.png"/>
        <tizen:description>MyService</tizen:description>
    </tizen:service>
    <tizen:setting background-support="enable" encryption="disable" hwkey-event="enable"/>
</widget>

 

The package includes an application and a service. I launch the service using the javascript code below in the main.js in the application. 

tizen.application.launchAppControl(
    new tizen.ApplicationControl("http://tizen.org/appcontrol/operation/service"),
    "mypackage.myservice",
	function() {console.log("Launch Service succeeded"); },
	function(e) {console.log("fail " + e.message"); });

 

However, the service didn't start. In simulator, the error message is "an attempt is made to reference a node in a context where it does not exist". On the real device (Gear S2), the error message is "given package is not found".

 

Can anybody tell me what's wrong here? 

 

Thanks a lot.

 

Jinghai

 

Responses

5 Replies
Vikram

Hi.

Try to add below code

<widget>
   <tizen:feature name="http://tizen.org/feature/web.service"/>
</widget>

 

daniel kim

Hi,

I would suggest you to check this link. and I think that Gear S2 doesn't support web service yet.

    https://developer.tizen.org/forums/web-application-development/full-service-application-example?tab=active

Regards

Jinghai Rao

Hi Daniel,

 

Thank you so much for the reference. It seems that I have to use native API instead of the Web API. 

Seoghyun Kang

Dear Jinghai Rao,

 

The Wearable profile supports the service application. But it is not opened.

So the 3rd party developer can not use the service application in the web platform.

 

As your comment, please use the native API for the service application.

Thanks.

Jinghai Rao

Hi Seoghyun,

Thans for the clarification.