ninthday / funf-open-sensing-framework

Automatically exported from code.google.com/p/funf-open-sensing-framework
0 stars 0 forks source link

v5 Scheduling not working #106

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use simple default config, eg:

{"@type":"edu.mit.media.funf.pipeline.BasicPipeline",
    "name":"default",
    "version":1,
    "data":[
        {"@type": "edu.mit.media.funf.probe.builtin.WifiProbe",
         "@schedule": {"interval": 100} }
        ]
    }

2. Start App, Launch Pipeline

What is the expected output? What do you see instead?

Expected: Wifi-Scan every 100 seconds

Instead: WifiProbe is never triggered (tested via Breakpoint in 
WifiProbe.saveWifiStateAndRunScan, furthermore, no data is in the archived file)

What version of the product are you using? On what operating system?

Funf 0.5.0 RC1, Android 4.3

Please provide any additional information below.

My Guess on the problem:

FunfManager.onStartCommand handles the alarm intent from android.
In lines 235 - 238 a NEW instance of an AlarmProbe is generated and run -> the 
new instance will NEVER have the listeners registered to trigger the scheduling 
chain.

Original issue reported on code.google.com by markus.p...@gmail.com on 30 Oct 2013 at 11:15

GoogleCodeExporter commented 9 years ago
I dont know if you are still seeing this issue but the workaround is to add 
"strict":true to config 

 "@schedule": {"interval": 10, "duration" : 10,  "strict": true}

Original comment by mrin...@gmail.com on 30 Nov 2014 at 12:54