Keep app in foreground like samsung health activity

Hi! I'm developing a gym app to track bpm, vo2, kcal and time of any activity on my galaxy watch, on c#. The problem is that, after some seconds, the app is put in background and the killed. I've fixed this by set Tizen.System.Power.RequestCpuLock(360000) and the display privilege; (max 60min of activity so). But the app is keeping to go in background after screen turns off, even still the app still runs well (thanks to the requestlock). can i keep it in foreground even after screen turns off?


3 Replies
Tizen .NET

In Galaxy Watch, it's the basic concep to go back to the clock screen after a few seconds(default: 20 seconds) while the screen is turned off.
Unfortunately, there's no available C# API in order to maintain the current screen without returning to the clock screen.


oh :(! Thanks anyway!
Emil Alipiev

hi you can use this code. follow the gist link there is the full implementation to import c++ library into c#.