Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating the read timestamp after reading a document changes its key #14

Open
shankari opened this issue Apr 10, 2016 · 1 comment
Open

Comments

@shankari
Copy link
Contributor

This code

    private void updateReadTimestamp(int keyRes) {
        SQLiteDatabase writeDb = this.getWritableDatabase();
        ContentValues updateValues = new ContentValues();
        updateValues.put(KEY_READ_TS, ((double)System.currentTimeMillis())/1000);
        updateValues.put(KEY_KEY, getKey(keyRes));
        writeDb.update(TABLE_USER_CACHE, updateValues, null, null);
        writeDb.close();
    }

sets the key for all entries in the database to the key of the read document.

shankari added a commit to shankari/e-mission-server that referenced this issue Apr 10, 2016
- In particular, the iOS battery level was never read, so we always got -100
- The android key was always "sensor_config" (because when we updated the
  read timestamp on the document, it updated everything including the key)
    e-mission/cordova-usercache#14
shankari added a commit to e-mission/e-mission-server that referenced this issue Apr 10, 2016
* Add support for a new module on datetime

Similar to moment.js in javascript, and supports parsing ISO format strings as
well as getting the timestamp from a datetime object, something which requires
too much fiddling otherwise.

* Fix a bunch of issues with the initial data collection for ground truth

- In particular, the iOS battery level was never read, so we always got -100
- The android key was always "sensor_config" (because when we updated the
  read timestamp on the document, it updated everything including the key)
    e-mission/cordova-usercache#14

* Fix issue with tour model creation

Found this while running the intake pipeline locally. Does not appear to happen
on the real server, but fixing corner cases is important!

* Add support for displaying the formatted time from the data_df in geojson

Makes it easier to debug maps in the various evaluations
@shankari
Copy link
Contributor Author

Fixed by updating android code to turn off the update of the read timestamp
52d519f
(line 162)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant