语言

Menu
Sites
Language
Apps run as Background Service continuously

Hello

I am trying to find a way to run our App continuously, as a background service. We want to take measurements from the sensors continuously. Is there a way to achieve this? Because after some seconds the OS turns our App to sleep. We use .net and Xamarin Forms

Tnx in advance.

编辑者为: Par Kouris 11 2月, 2021

响应

1 回复
Tizen .NET

Hi,
Please declare <background-category> in tizen-manifest.xml file for sensor data.
       <background-category value="sensor" />
To keep the device awake while the service app is running, you can use Power.RequestLock(PowerLock.Cpu, 0)/ReleaseLock(PowerLock.Cpu) APIs which are available on Tizen 5.0 and above.
(To use Power API, http://tizen.org/privilege/display privilege should be also defined in tizen-manifest.xml file.)