Languages

Menu
Sites
Language
Native app running in the background

Hi,

 

Is it possible use something similar as <tizen:setting background-support="enable" /> in a Native App?

I've developed a service application which support a web app running in other thread some process but when the screen turn off this service application stop running and I need to keep it alive.

 

Thanks in advance

 

Responses

7 Replies
Alex Dem

Hi,
Native service app is already background app. I am not sure that it should be stopped if dispaly was turned off. 
I was able to launch native service with turend off screen. But maybe it could be depending on the device (some error etc) .
Alexey.

Miguel Benitez

Hi Alex,

Thank you for you respond. 

You are right, the background app is working fine, I've found out that my problem is with the  sensor which stops when the screen is turned off. Now I'm trying to figure out what is going on

So far I added these metadata to the manifest file:

        <metadata key="http://tizen.org/metadata/background-category/sensor"/>
          <metadata key="http://tizen.org/metadata/background-category/iot-communication"/>

But continuing not working what It is a little bit weird because if I run heart rate sensor using a web app I don't have this kind of issue. It's continue working fine.

I think I'm going to look for more info or create a new post with my problem.

Cheers,

Miguel.

 

 

 

 

AVSukhov

Hello,

Try to use SENSOR_OPTION_ALWAYS_ON:

https://developer.tizen.org/dev-guide/2.3.1/org.tizen.native.mobile.apireference/group__CAPI__SYSTEM__SENSOR__MODULE.html

Miguel Benitez

It's working!! Thank so much, you make my day :)

Miguel Benitez

It's working!! Thank so much, you make my day :)

Alex Dem

Hi,
fyi, similar topic was before:
https://developer.tizen.org/ko/forums/native-application-development/tizen-accelerometer-sensor-usage
Alexey.

Miguel Benitez

Really useful! Thanks!