Closed ktkarhu closed 9 years ago
Janne, katsotaan tämä yhdessä mihin kannattaa tehdä.
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
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.
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.
Done
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.