aalto-trafficsense / regular-routes-client

"Learning Regular Routes" -client
MIT License
0 stars 0 forks source link

Show activity with greatest confidence in the UI instead the first in the array #33

Closed ktkarhu closed 9 years ago

ktkarhu commented 9 years ago

It seems that activities are not sorted by confidence when showing in the UI and instead the first in the array is used? See: ConfigFragment.updateApplicationFields() -> ... detectedActivities.getFirst()

Or did I understood it wrongly?

Activity parsing and sorting by confidence is now actually done in three different phases:

Probably we should sort the list once in ActivityFilter and then use that for UI and also on server side.

ktkarhu commented 9 years ago

Janne, katsotaan tämä yhdessä mihin kannattaa tehdä.

finnlander commented 9 years ago

Huomasin jossain vaiheessa saman, että järjestys ei aina päde, vaikkakin dokumentaatio (https://developer.android.com/reference/com/google/android/gms/location/ActivityRecognitionResult.html) sanoo:

public List getProbableActivities ()

Returns the list of activities that where detected with the confidence value associated with each activity. The activities are sorted by most probable activity first.

... Tein logiikan alunperin em. mainintaan perustuen.

ktkarhu commented 9 years ago

As we discussed today let's just skip the ON_FOOT from the activity list when showing in the UI. We can still store it in DB for later analysis.

finnlander commented 9 years ago

Done