Repository navigation
Description
Part of #1902.
I went through the phone apps and the field package code looking for ways a crew can lose work or be misled, then tried what I could on a phone: a Galaxy S24+ on Android 17 with RustGIS 0.7.0 from Play. That's the first Android device run (#1902 still says untested). Items marked "Seen on Android" happened on that phone; the rest come from the code or an engine test. Bring Back's design is in #2468.
Losing work
-
No recovery copy on the phone. Seen on Android: I added a point to the World sample, pressed Home, and ended the app with
adb shell am kill org.rustgis.mobile. On relaunch the sample opened fresh, with no point and no offer to recover it. The desktop copies unsaved work to app data every few minutes; the phone shell starts without a recovery store, soautosave::tickdoes nothing (crates/ui-egui/src/autosave.rs), and Android saves nothing when the app goes to the background. Photos already taken stay on disk without the features that used them. Fix: the desktop's recovery store in the app's private storage, written after each completed edit (a kill can skip the lifecycle callbacks), keeping the package's origin and the paths to its basemaps and photos. -
Save never writes back to the opened file, and every Save makes a new copy. Seen on Android: saving the sample twice gave two files, the second named
… (1).rgis. I then opened the first, added a point and saved: Save Project As and the picker came up again, the point went to a third file,… (2).rgis, and the file I'd opened kept its time and size. Opening copies the file into the app's storage without keeping the original's address, and Save goes throughServices::download. Tracking: a mobile app for field data collection (Android and iOS) #1902 lists the cause ("edits do not reach the original") but it has no issue. Fix: keep the opened document's address and a write grant (Android: a persistable URI permission; iOS: a security-scoped bookmark). Save writes there and Save As picks; the picker stays for read-only files, expired grants and opened field packages. That also clears two follow-ups in Tracking: a mobile app for field data collection (Android and iOS) #1902: the unsaved mark left after a picker save (seen on Android: opening a file right after two Saves still asked "Save changes?"), and "Save changes?"'s Save not going on to what was asked. -
An old field package renamed to
.rgispkgkeeps its link to the home table. Reproduced: a 10-row GeoPackage layer clipped to 3 rows opened with its edit link and 7 deletions pending, and a Save to GeoPackage would apply them. Fixed in fix(engine): unlink tables in renamed legacy field packages #2481.
Wrong data
-
On Android, a worse position replaces a better one. Seen on Android with test location providers: a 5 m GPS fix, then one second later a 150 m network fix 150 m north. The dot moved 150 m north and drew a 150 m ring. With precise location the app listens to GPS and the network provider and shows whichever fix came last, with no accuracy or age check (
MainActivity.java,report_position), so Go to My Position puts the capture cross there too. Track recording already drops bad and out-of-order fixes (crates/ui-touch/src/track.rs); the live position needs the same rule, usinggetElapsedRealtimeNanosrather than the wall clock. -
A renamed offline map isn't refreshed by Bring Back. Reproduced: after
map.renameofCrew (offline)at home, Bring Back added the crew's point to the source map and reported success, but the renamed map still showed the old data, and reopening the area made a secondCrew (offline)tab. Refresh, desktop Sync and packaging from an offline map find it by the name<area> (offline). Fix: record the area's id on the offline map and use that.
Can't reach the controls
-
Capture in landscape shows one row. Seen on Android: with the phone sideways, the Capture sheet shows only "Add Vertex Here" and doesn't scroll, so Finish, Undo Vertex, the layer choice and the attribute form can't be reached. Turning the phone upright shows them all.
-
Dialogs sit off the left edge. Seen on Android, upright, with or without the keyboard: Save Project As and "Save changes?" are shifted left, so the label reads "ame", the hint "hoose where…", and Save is cut off on the right. Both still work.
Said too little
-
What a field package leaves behind. A package carries one map, its feature layers clipped to the area, its styles, and local MBTiles and PMTiles. The rest stays home, and the desktop says so. Three gaps, from the code (not yet tried on a phone):
- Layers read in place from a file (streamed) keep only their desktop path and arrive empty, with no notice anywhere.
- Photos named in a feature's
photoorphotosfield at home don't go out, with no notice. Photos taken on the phone do come back. - The notices go to whoever made the package. The crew opening it gets none, so "this map has no rasters" looks the same as "the rasters failed to load".
Fix: copy a streamed layer's features within the area, or say how many were left out; copy named photos within a size limit; write what stayed home into the package and show it when the phone opens it.
Not included
Old projects from 0.5.0 or 0.6.0 that saved an offline map with its table link and then renamed it. Nothing saved in them tells such a copy from an ordinary layer with deletions waiting, so it can't be caught on open, and Save Edits already shows how many rows it will delete. Not worth a change to the save commands for a case this narrow.
Background sync. Field packages are files the crew sends and someone at home brings back, and nothing in the design sends anything by itself. Syncing in the background needs somewhere to sync with, which is a direction question for #1902 rather than a gap.
Activity
feat(mobile): Save writes a project back to the file it was opened fr…
fix(engine): photos named at home go out with a field package and com…