Replies: 2 comments
-
I am having a similar problem. My application is receiving data from the internet. During the day it usually works fine. But at night the data is not updated. I attribute this to the fact that at night the phone does not see user activity and limits background processes. Usually after that in the morning the service works normally, but not always. |
Beta Was this translation helpful? Give feedback.
-
After some testing (Thanks to new alert) It looks like app-service goes down when bluetooth disconnects, and app-service tries to do web request (Every 1 min). AppService then will go dark, and won't restart or after bluetooth is connected. Only way to get it running then is to open Zepp-app on ios phone, and then kill/start app service again. @MyoungXUE Do you have some idea why it does happen? I'd assume that app-service would just throw some error if network request fails, but not die and be able to continue working in loop when bluetooth goes back online. |
Beta Was this translation helpful? Give feedback.
-
Im using Continuous Running app service -> https://docs.zepp.com/docs/guides/framework/device/app-service/
Inside it, in 1 min loop it does (in promise chain):
AppService looks like this:
and Main loop looks like this:
For some reason loop works fine for some debuging period of time, but when i go sleep with it turned on, it fails to work in nighttime, later on morning it looks like whole appService is dead, and i didn't get any error notification nor systme log inside zepp app.
What might be a possible case?
In documentation there's "The "App Service" will exit only when the exit service API is actively called or when system-related restrictions are triggered."
What kind of restrictions might kill my service? Is there a way to better log possible cause?
Beta Was this translation helpful? Give feedback.
All reactions