语言

Menu
Sites
Language
Wearable - Start service application at restart

Hello,

 

I'm developing a Tizen wearable background service, which communicates with an Android app.

I need to start the service at boot time, but I cannot find in the doc how I can do that.

 

Here is my manifest :

<service-application appid="APP_ID" on-boot="true" auto-restart="true" exec="EXEC_NAME" multiple="false" nodisplay="true" taskmanage="false" type="capp">

 

I've added on-boot="true"  and auto-restart="true", but according to the dev guide it does not work on wearable device :

 >  This attribute is not supported in Tizen wearable devices.

 

If I cannot start the service automatically at boot time, is there a way to start it from the Android app ?

响应

4 回复
Onur Şahin

You cannot use on-boot and auto-restart on wearable as you discovered yourself and I'm not sure about android part but what you can do is register a repeating alarm to start your service if its dead.

Just make sure you keep the repeating interval as high as you can tolerate so you wont drain battery much.

Victor Sigal

It was one of best feature of this OS and now it is removed.

Please describe any workaround to solve problem- how to start service at boot time?

Armaan-Ul- Islam

Seems recently Tizen is focused on resource optimization, and has set highest priority on this one.

 

You can use Alarm API to launch an app as Onur Şahin mentioned. Since Tizen 2.4, the alarm_schedule_after_delay() has added some restrictions but still, Alarm API is the possible solution.

 

Alarm Guide

Alarm API Reference