AbelTong / funf-open-sensing-framework

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

BasicPipeline.writeData: check if timestamp is not null fails if using BrowserBookmarkProbe #105

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. implement BrowserBookmarkProbe
2. run app incl. probe

What is the expected output? What do you see instead?
Bookmarks should be tracked but in BrowserBookmarkProbe.java (line 148) a 
timestamp (which does not exist) is converted to a Double. That results in 
throwing an Exception thanks to line 150 where timestamp is checked if it is 0L 
and if yes, it throws the exception that not all required values are specified.

10-21 15:01:18.543: E/Funf(13089): Unable to save data.  Not all required 
values specified. 0.0 edu.mit.media.funf.probe.builtin.BrowserBookmarksProbe - 
{"_id":20,"bookmark":1,"created":1367721737781,"date":0,"timestamp":0.0000,"titl
e":"{\"ONE_WAY_HASH\":\"a4d41d5df15bb91b1aa7c33cad7adcdafef82d43\"}","url":"{\"O
NE_WAY_HASH\":\"de9da5868d447858a8bbb68c64738de37c0865e1\"}","visits":0}

10-21 15:01:18.543: E/AndroidRuntime(13089): FATAL EXCEPTION: 
edu.mit.media.funf.pipeline.BasicPipeline
10-21 15:01:18.543: E/AndroidRuntime(13089): android.database.SQLException: Not 
all required fields specified.
10-21 15:01:18.543: E/AndroidRuntime(13089):    at 
edu.mit.media.funf.pipeline.BasicPipeline.writeData(BasicPipeline.java:152)
10-21 15:01:18.543: E/AndroidRuntime(13089):    at 
edu.mit.media.funf.pipeline.BasicPipeline$1.handleMessage(BasicPipeline.java:120
)
10-21 15:01:18.543: E/AndroidRuntime(13089):    at 
android.os.Handler.dispatchMessage(Handler.java:95)
10-21 15:01:18.543: E/AndroidRuntime(13089):    at 
android.os.Looper.loop(Looper.java:137)
10-21 15:01:18.543: E/AndroidRuntime(13089):    at 
android.os.HandlerThread.run(HandlerThread.java:60)

What version of the product are you using? On what operating system?
Funf 0.4, Android 4.1.2

Please provide any additional information below.
The browser component does not have any timestamp-field so the check for 
timestamp to write data must be corrected. Bookmark has CREATED and DATE 
attributes.

Original issue reported on code.google.com by dennis.r...@googlemail.com on 21 Oct 2013 at 2:58