Moved - Background Service Help

Hi, I also have something weird going on with my BackgroundService. It works fine when the temporal events are triggered manually in the simulator, but when I let it run on its own it triggers once and then nothing else happens.

Here is my base class: https://pastebin.com/TZtcrmFt
.. and here is my background service: https://pastebin.com/3ayW3CnD

Anyone who can see what's wrong?
  • Snorrus - This sounds different than the problem by the original poster. A quick look at the code tells me it was kind of based on the sample I posted in this thread. I take it you are seeing this in the sim - Which SDK/device? What are you seeing in the console with the Sys.println() calls?
  • Yes, I've builded upon that example:) Yes I am running it in the sim and I've tried both SDK 2.3.X and 2.4.X, with the Vivoactive HR. In the output below I've just started the simulation, started a session and triggered a temporal event manually. When I leave it running nothing happens other than the compute() function in my view class, found here: https://pastebin.com/EpyLdRnU
    My fit contribution class can be seen here, if it is relevant: https://pastebin.com/KYgh7uSu

    Console output:

    datafieldApp->initialize
    datafieldApp->onStart
    datafieldApp->getInitialView
    datafieldApp->getInitialView System has bgs support.
    glucose_datafieldView->initialize
    SGVFitContributor-> initialize.
    FIT field initialized.
    FIT contributor initialized
    glucose_datafieldView-> compute: tempFlag = null, tempSgv = null, sessionRunning = false
    datafieldApp->initialize
    datafieldApp->onStart
    datafieldApp-> getServiceDelegate
    BgbgServiceDelegate->initialize
    BgbgServiceDelegate initialized.
    BgbgServiceDelegate-> onTemporalEvent
    onTemporalEvent: phone connected
    RequestListener->initialize
    CommListener:
    BgbgServiceDelegate-> onMail: Mail received: 0.00
    datafieldApp->onStop
    datafieldApp-> onBackgroundData: Background data received: 0.00
    glucose_datafieldView-> compute: tempFlag = true, tempSgv = 0.00, sessionRunning = false
    glucose_datafieldView-> compute: tempFlag = false, tempSgv = 0.00, sessionRunning = false
    glucose_datafieldView-> compute: tempFlag = false, tempSgv = 0.00, sessionRunning = false
    glucose_datafieldView-> compute: tempFlag = false, tempSgv = 0.00, sessionRunning = false
    glucose_datafieldView-> compute: tempFlag = false, tempSgv = 0.00, sessionRunning = false
    glucose_datafieldView-> compute: tempFlag = false, tempSgv = 0.00, sessionRunning = false
    glucose_datafieldView-> compute: tempFlag = false, tempSgv = 0.00, sessionRunning = false
    glucose_datafieldView-> compute: tempFlag = false, tempSgv = 0.00, sessionRunning = false
    glucose_datafieldView-> onTimerStart: Session started
    glucose_datafieldView-> compute: tempFlag = false, tempSgv = 0.00, sessionRunning = true
    glucose_datafieldView-> compute: tempFlag = false, tempSgv = 0.00, sessionRunning = true
    glucose_datafieldView-> compute: tempFlag = false, tempSgv = 0.00, sessionRunning = true
    datafieldApp->initialize
    datafieldApp->onStart
    datafieldApp-> getServiceDelegate
    BgbgServiceDelegate->initialize
    BgbgServiceDelegate initialized.
    BgbgServiceDelegate-> onTemporalEvent
    onTemporalEvent: phone connected
    RequestListener->initialize
    CommListener:
    BgbgServiceDelegate-> onMail: Mail received: 0.00
    datafieldApp->onStop
    datafieldApp-> onBackgroundData: Background data received: 0.00
    glucose_datafieldView-> compute: tempFlag = true, tempSgv = 0.00, sessionRunning = true
    SGVFitContributor-> initialize.
    FIT field initialized.
    tempSgv = 0.00
    SGVFitContributor-> compute
    0.000000
    ContrLapAverage= 0.000000
    ContrSessionAverage = 0.000000
    Lap record count = 1
    Sgv lap average= 0.000000
    Sgv session average = 0.000000
    FIT data recorded!
    glucose_datafieldView-> compute: tempFlag = false, tempSgv = 0.00, sessionRunning = true
    glucose_datafieldView-> compute: tempFlag = false, tempSgv = 0.00, sessionRunning = true
    glucose_datafieldView-> compute: tempFlag = false, tempSgv = 0.00, sessionRunning = true
    glucose_datafieldView-> compute: tempFlag = false, tempSgv = 0.00, sessionRunning = true
  • Former Member
    Former Member
    Hey Snorrus,

    I've moved this to the regular forum until we determine that there is a bug in the SDK.

    Thanks,
    -Coleman
  • Any updates on this, jim_m_58? I'm still having the same problem.