Tracking: field work gaps found on an Android phone and in the phone code

Open
#2,485 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
20/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
android, ios, rust
Domain
data, mobile

Research direction

This tracking issue groups several field work gaps, with code pointers including crates/ui-egui/src/autosave.rs, MainActivity.java, and crates/ui-touch/src/track.rs; start by choosing one unchecked item and reading its linked issue or named code path. Done means addressing that item's stated failure and confirming its described outcome. The list includes cross-platform save behavior, package handling, and mobile UI work, so it does not define one bounded first contribution.

Written by the indexing model from the issue text.

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, so autosave::tick does 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 through Services::download. #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 #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 .rgispkg keeps 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 #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, using getElapsedRealtimeNanos rather than the wall clock.

  • A renamed offline map isn't refreshed by Bring Back. Reproduced: after map.rename of Crew (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 second Crew (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 photo or photos field 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.

Dominant language
Rust
Stars
1.9k
Forks
268
Avg merge
11h 1m
Merged PRs (30d)
942

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from opengeos/RustGIS

All issues in opengeos/RustGIS

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.