0

I have installed a Tizen web application in Samsung Gear S3. The application uses sensors and collects the heart rate, pedometer, accelerometer data etc., I want the application to run all the time. But some how, the application is terminated after sometime.

Every 10 minutes in the day time (say 8am to 8pm), user gets a notification to give an input in the application and the application restarts when the user clicks on the link to the application.

This implies, every 10 minutes, the application restarts. Even between those 10 minutes, the application gets terminated. I don't know why.

I tried using CPU_AWAKE to not let the watch go into sleep mode with the following command.

tizen.power.request("CPU", "CPU_AWAKE");

I have also enabled the background support in config.xml file.

The application used to work fine in Samsung Gear S2, I am not able to understand why it gets stopped in S3.

Please let me know if anyone knows the reason and how to fix it.

Thanks.

2 Answers2

1

Thank you so much for suggesting me the work arounds. I tested the application and found the reason for application being terminated.

tizen.power.request("CPU", "CPU_AWAKE");

The above line in my app code makes the application consume more battery and gives me a notification saying "app using more battery, close the app?". If I don't respond to the notification with in 10 seconds or so, the application is closed automatically.

Now, after removing that line of code, my application runs fine all the time.

0

Tizen Platform is trying to optimize background processes to boost up performance, that's what this release note indicates :

Tizen Release Notes

(Cnrl+F, Search for 'background')

Though it's not specifically stated in the case of 2.3.2 (Gear S3 default), but I guess that could be the case as it is not in previous versions (with the Gear S2). But their exists some procedures. Why don't you give Web Services or Web workers a try, And there is also the opportunity of using Native background service with existing Web UI

Tizen Web Service Application

Web Workers in Tizen

Tizen Native Service Applications , Tizen Hybrid Service Sample Overview

(Chose which one suits your requirements and your expertise).

Md. Armaan-Ul-Islam
  • 2,154
  • 2
  • 16
  • 20