Skip to content

linzhi2013/SamplingTrack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SamplingTrack

SamplingTrack is an offline-first Android app for recording field specimen collections. It supports projects, sequential sample-tube numbers, configurable fields, location, photos, drafts, ZIP import/export, and optional cloud backup.

Install the alpha APK

The included APK supports Android 8.0 (API 26) and later:

SamplingTrack-0.1.0-alpha.24-debug.apk

The APK is debug-signed and intended for alpha testing. On the Android device, allow installation from the app used to open the APK, then select the APK to install it. With Android platform tools installed, it can also be installed from this directory:

adb install -r SamplingTrack-0.1.0-alpha.24-debug.apk

Build from source

The checked-in Pixi environment targets Apple Silicon macOS and provides JDK 17 and Gradle 8.9. Install Pixi, then run these commands from the repository root:

pixi install
pixi run setup-android-sdk
pixi run check
pixi run build

The generated APK is written to:

app/build/outputs/apk/debug/app-debug.apk

For an emulator-based launch check:

pixi run setup-emulators
pixi run device-smoke

Privacy and data

  • No account, advertising, analytics, or remote crash-reporting service is included.
  • Projects and photos are stored in the Android app's private storage.
  • Location is requested only when the user asks the app to read it; the app does not record a background route.
  • ZIP export and import are controlled by the user.
  • Cloud backup is optional and uses an HTTPS or WebDAV directory supplied by the user.
  • A configured cloud link is encrypted with Android Keystore and is not displayed in full after saving.

Uninstalling the app removes its private local data. Export important projects or complete a cloud backup before uninstalling.

Reading exported projects

Export project ZIP creates a complete, portable copy of one project. Keep the ZIP unchanged if it may be imported back into SamplingTrack. To inspect or analyze the data, make a copy and extract it with the system archive tool or:

unzip Project-name.zip -d Project-name-export

An export contains:

Project-name.zip
├── project.json
├── records.json
├── drafts.json
├── records.csv
├── integrity.json
└── photos/
    ├── 1_01.jpg
    ├── 1_02.jpg
    └── draft_2_01.jpg
File Purpose
records.csv The easiest file to read in Excel, LibreOffice, R, Python, or another data-analysis tool. It contains one row per collection record.
project.json Project settings, sequence formatting, default collectors, built-in field settings, and custom field definitions.
records.json Full-fidelity saved records used when importing the project back into SamplingTrack.
drafts.json Raw autosaved form state for unfinished or interrupted edits, including partially entered values and draft photo references.
photos/ Original-quality photos. The relative photo paths are also recorded in the CSV and JSON files.
integrity.json File sizes and SHA-256 checksums used by SamplingTrack to detect missing, changed, or damaged export contents.

Reading records.csv

The CSV is comma-separated UTF-8 with a byte-order mark, so current versions of Excel and LibreOffice should display its Chinese column names correctly. Its built-in columns cover:

  • collection number, completion status, collection time, and collectors;
  • weather, temperature, and humidity;
  • latitude, longitude, altitude, location source, accuracy, and location time;
  • collection site, specimen name, quantity, habitat, and notes;
  • photo count and relative photo paths.

Project-specific custom fields are appended as additional columns. Multiple collectors, choices, or photo paths are separated with or . Empty optional values remain empty. Times include the local UTC offset, and coordinates retain their saved precision.

Python with pandas:

import pandas as pd

records = pd.read_csv("records.csv", encoding="utf-8-sig")
print(records[["采集序号", "采集时间", "纬度", "经度", "标本名称"]].head())

R:

records <- read.csv("records.csv", fileEncoding = "UTF-8-BOM", check.names = FALSE)
head(records)

The CSV is an analysis copy, not the source used for app restoration. Editing only records.csv will not change the JSON records, and changing any extracted file will cause the original integrity manifest to fail validation. Use the unchanged ZIP with Import project from ZIP when restoring data to SamplingTrack.

Exports can contain collector names, precise coordinates, notes, unfinished drafts, and original photos. Review or remove sensitive data before sharing an export with other people.

Screenshots

Project list New project Field settings
English project list New project form Collection field settings
Record form Collection records Cloud backup
Record form with example coordinates Collection records Cloud backup settings

The interface is available in English and Simplified Chinese:

Chinese project list

License

SamplingTrack is available under the MIT License.

About

Offline Android app for field specimen collection with GPS and photos.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages