OpenTracksApp/OpenTracks
8
113
Fork
You've already forked OpenTracks
21

Dashboard API: resilience needed #2265

Open
opened 2026年02月01日 20:20:51 +01:00 by dennisguse · 8 comments

Currently, there are no tests or other measures to prevent the Dashboard API to broken.
One example is renaming columns in the SQLite database.
This database is exposed via SharedContentProvider directly to OSMDashboard.

What we can do:

  • Implement test to verify the query OSMDashboard is doing still works
  • implement compatibility layer using SqliteQueryBuilder.setProjectionMap
  • (not nicely doable as we need to open the DB twice) Move the Dashboard API to a separate content provider and implement some mapping
  • Add some technical documentation on how the Dashboard API works (and move it to a visible package)

For the 2nd this might be helpful.

https://developer.android.com/reference/android/database/sqlite/SQLiteQueryBuilder#setProjectionMap(java.util.Map%3Cjava.lang.String,java.lang.String%3E)

Follow-up to #2255.

Currently, there are no tests or other measures to prevent the Dashboard API to broken. One example is renaming columns in the SQLite database. This database is exposed via SharedContentProvider directly to OSMDashboard. What we can do: - [x] Implement test to verify the query OSMDashboard is doing still works - [x] implement compatibility layer using SqliteQueryBuilder.setProjectionMap - [x] (not nicely doable as we need to open the DB twice) Move the Dashboard API to a separate content provider and implement some mapping - [ ] Add some technical documentation on how the Dashboard API works (and move it to a visible package) For the 2nd this might be helpful. https://developer.android.com/reference/android/database/sqlite/SQLiteQueryBuilder#setProjectionMap(java.util.Map%3Cjava.lang.String,java.lang.String%3E) Follow-up to #2255.
Author
Owner
Copy link

We now have basic tests for column names.

We now have basic tests for column names.
Author
Owner
Copy link

@pstorch Can we use separate URIs for the Dashboard API? Or is there some migration effort?

@pstorch Can we use separate URIs for the Dashboard API? Or is there some migration effort?

@dennisguse the uris are read from the intent. They just need to be in the right order.

@dennisguse the uris are read from the intent. They just need to be in the right order.
Author
Owner
Copy link

That works. I will create new URIs then and apply the projection map there.

Adding a separate ContentProvider would require opening the DB twice.

PS/ the whole ContentProvider also needs some overhaul. That's a story for another time ;)

That works. I will create new URIs then and apply the projection map there. Adding a separate ContentProvider would require opening the DB twice. PS/ the whole ContentProvider also needs some overhaul. That's a story for another time ;)
Author
Owner
Copy link

Got the projection map working.
We have now full backward compatibility to version 2.

@pstorch Why not just stay at version 2 for now?
Version 3 can remain in place for OSMDashboard, but it has no benefit at the moment (beside stuff being renamed).

Got the projection map working. We have now full backward compatibility to version 2. @pstorch Why not just stay at version 2 for now? Version 3 can remain in place for OSMDashboard, but it has no benefit at the moment (beside stuff being renamed).

@dennisguse I'm fine with it. It works in both versions now.

@dennisguse I'm fine with it. It works in both versions now.
Author
Owner
Copy link

Tested with OSMDashboard v6.4.1 (latest on FDroid) and released as v4.25.2.

Tested with OSMDashboard v6.4.1 (latest on FDroid) and released as v4.25.2.
Author
Owner
Copy link

Tested with OSMDashboard v6.4.1 (latest on FDroid) and released as v4.25.2.

Tested with OSMDashboard v6.4.1 (latest on FDroid) and released as v4.25.2.
Sign in to join this conversation.
No Branch/Tag specified
main
bugExport#2285
heartrate
dashboard#2265
fit
v4.28.0
v4.27.2
v4.27.1
v4.27.0
v4.26.2
v4.26.1
v4.26.0
v4.25.2
v4.25.1
v4.25.0
v4.24.2
v4.24.1
v4.24.0
v4.23.2
v4.23.1
v4.23.0
v4.22.2
v4.22.1
v4.22.0
v4.21.1
v4.21.0
v4.20.0
v4.19.6
v4.19.5
v4.19.4
v4.19.3
v4.19.2
v4.19.1
v4.19.0
v4.18.0
v4.17.8
v4.17.7
V4.17.6
v4.17.5
v4.17.4
v4.17.3
v4.17.2
v4.17.1
v4.17.0
v4.16.1
v4.16.0
v4.15.0
v4.14.2
v4.14.1
v4.14.0
v4.13.1
v4.13.0
v4.12.5
v4.12.4
v4.12.3
v4.12.2
v4.12.1
v4.12.0
v4.11.3
v4.11.2
v4.11.1
v4.11.0
v4.10.1
v4.10.0
v4.9.9
v4.9.8
v4.9.7
v4.9.6
v4.9.5
v4.9.4
v4.9.3
v4.9.2
v4.9.1
v4.9.0
v4.8.4
v4.8.3
v4.8.2
v4.8.1
v4.8.0
v4.7.1
v4.7.0
v4.6.2
v4.6.1
v4.6.0
v4.5.0
v4.4.0
v4.3.5
v4.3.4
v4.3.3
v4.3.2
v4.3.1
v4.3.0
v4.2.2
v4.2.1
v4.2.0
v4.1.2
v4.1.1
v4.1.0
v4.0.8
v4.0.7
v4.0.6
v4.0.5
v4.0.4
v4.0.3
v4.0.2
v4.0.1
v4.0.0
v3.28.0
v3.27.0
v3.26.1
v3.26.0
v3.25.1
v3.25.0
v3.24.1
v3.24.0
v3.23.0
v3.22.0
v3.21.0
v3.20.2
v3.20.1
v3.20.0
v3.19.1
v3.19.0
v3.18.6
v3.18.5
v3.18.4
v3.18.3
v3.18.2
v3.18.1
v3.18.0
v3.17.3
v3.17.2
v3.17.1
v3.17.0
v3.16.0
v3.15.4
v3.15.3
v3.14.2
v3.15.2
v3.15.1
v3.15.0
v3.14.3
v3.14.1
v3.14.0
v3.13.2
v3.13.1
v3.13.0
v3.12.0
v3.11.1
v3.11.0
v3.10.0
v3.9.5
v3.9.4
v3.9.3
v3.9.2
v3.9.1
v3.9.0
v3.8.1
v3.8.0
v3.7.6
v3.7.5
v3.7.4
v3.7.3
v3.7.2
v3.7.1
v3.7.0
v3.6.2
v3.6.1
v3.6.0
v3.5.0
v3.4.0
v3.3.2
v3.3.1
v3.3.0
v3.2.11
v3.2.10
v3.2.9
v3.2.8
v3.2.7
v3.2.6
v3.2.5
v3.2.4
v3.2.3
v3.2.2
v3.2.1
v3.2.0
v3.1.0
v3.0.1
v3.0.0
v2.0.0
v2.0.3
v2.0.2
v2.0.6
v2.0.5
v2.0.4
v1.1.16
v1.1.15
v1.1.14
v1.1.13
v1.1.12
v1.1.11
v1.1.10
v1.1.9
v1.1.8
v1.1.7
v1.1.6
v1.1.5
v1.1.4
v1.1.3
v1.1.2
v1.1.1
v1.1.0
v1.0.21
v1.0.20
v1.0.19
v1.0.18
v1.0.17
v1.0.16
v1.0.15
v1.0.14
v1.0.13
v1.0.12
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
OpenTracksApp/OpenTracks#2265
Reference in a new issue
OpenTracksApp/OpenTracks
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?