You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add release-please integration for automated releases
- Add release-please-config.json and manifest for version tracking
- Add GitHub Actions workflows:
- release-please.yml: Creates release PRs on push to master
- release.yml: Builds and uploads APKs to GitHub Releases
- ci.yml: Runs build, tests, and lint on push/PR
- Update app/build.gradle with semantic versioning (20.0.0)
using x-release-please markers for automated version bumps
- Update CLAUDE.md with improved documentation
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CLAUDE.md
+47-56Lines changed: 47 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,85 +4,76 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
4
4
5
5
## Project Overview
6
6
7
-
This is **gexporter**, an Android companion app that serves GPX/FIT files to Garmin devices via HTTP. It works together with the **gimporter** Garmin ConnectIQ app located in the parent directory's gimporter/ folder.
8
-
9
-
For complete project documentation covering both apps, see the parent directory's CLAUDE.md file.
7
+
This is **gexporter**, an Android companion app that serves GPX/FIT files to Garmin devices via HTTP. It works with the **gimporter** Garmin ConnectIQ app in the parent directory's gimporter/ folder.
10
8
11
9
## Build Commands
12
10
13
11
```bash
14
-
# Build the Android app
15
-
gradle build
16
-
17
-
# Run unit tests
18
-
gradle test
19
-
20
-
# Clean build artifacts
21
-
gradle clean
12
+
./gradlew build # Build the app
13
+
./gradlew test# Run unit tests
14
+
./gradlew assembleDebug # Build debug APK
15
+
./gradlew assembleRelease # Build release APK
22
16
23
-
#Build debug APK
24
-
gradle assembleDebug
17
+
#Run a single test class
18
+
./gradlew test --tests "org.surfsite.gexporter.TestPlay"
25
19
26
-
#Build release APK
27
-
gradle assembleRelease
20
+
#Run a single test method
21
+
./gradlew test --tests "org.surfsite.gexporter.TestPlay.test10"
28
22
```
29
23
30
-
## Architecture
24
+
## Local Development Server
31
25
32
-
### Core Components
26
+
Run `TestRunServer.main()` to start a standalone HTTP server on localhost:22222 that serves files from `~/Downloads/`. Use this with the ConnectIQ simulator for development.
33
27
34
-
-**WebServer.java**: NanoHTTPD-based HTTP server (port 22222) with endpoints:
35
-
-`/dir.json` - Returns JSON list of available tracks
36
-
-`/{filename}` - Downloads specific GPX/FIT file
37
-
- Handles on-the-fly GPX to FIT conversion
28
+
## Architecture
38
29
39
-
-**MainActivity.java**: Android UI that:
40
-
- Receives files via Android intents (ACTION_SEND, ACTION_VIEW)
41
-
- Manages server lifecycle (start/stop)
42
-
- Displays server status and file list
43
-
- Handles file selection from various sources
30
+
### HTTP Server (WebServer.java)
44
31
45
-
-**Gpx2Fit.java**: Converts GPX to FIT format:
46
-
- Configurable via Gpx2FitOptions
47
-
- Supports waypoints, tracks, and routes
48
-
- Handles elevation data and GPS coordinates
32
+
NanoHTTPD-based server on port 22222 with endpoints:
33
+
-`GET /dir.json` - JSON list of available tracks with query params:
34
+
-`?type=GPX` - only return GPX files
35
+
-`?short=1` - return relative URLs instead of full URLs
36
+
-`?longname=1` - preserve full filename (otherwise truncated to 15 chars)
37
+
-`GET /{filename}` - Download file; GPX files are converted to FIT on-the-fly unless `?type=GPX`
49
38
50
-
-**WayPoint.java**: Data structure for GPS waypoints
51
-
-**Gpx2FitOptions.java**: Configuration for GPX conversion (speed, power, etc.)
39
+
### GPX to FIT Conversion (Gpx2Fit.java)
52
40
53
-
### File Handling
41
+
Parses GPX 1.0/1.1 files and converts to Garmin FIT course format:
42
+
- Extracts `<trk>`, `<rte>`, and `<wpt>` elements
43
+
- Applies grade-adjusted pace using Minetti walking energy cost model
44
+
- Writes FIT messages: FileId, Course, Lap, Event, Record, CoursePoint
54
45
55
-
The app receives GPX/FIT files through Android's sharing mechanism and stores them in the configured directory for serving to Garmin devices.
46
+
### Conversion Options (Gpx2FitOptions.java)
56
47
57
-
## Development Workflow
48
+
-`speed` - Default pace in m/s
49
+
-`forceSpeed` - Override timestamps with calculated speed
50
+
-`use3dDistance` - Include elevation in distance calculations
51
+
-`walkingGrade` - Apply grade-adjusted pace
52
+
-`injectCoursePoints` - Add course points along the track
53
+
-`maxPoints` - Limit number of route points (for device compatibility)
54
+
-`minRoutePointDistance` / `minCoursePointDistance` - Point density control
58
55
59
-
1.**Local Development**:
60
-
- Use Android Studio or command-line Gradle
61
-
- Run `TestRunServer.main()` to start standalone server on localhost:22222
62
-
- Connect Garmin ConnectIQ simulator to localhost for testing
56
+
### ConnectIQ Integration (MainActivity.java)
63
57
64
-
2.**Testing with Real Devices**:
65
-
- Install app on Android device
66
-
- Share GPX/FIT files to the app
67
-
- Start server from the app
68
-
- Connect Garmin device to same network
69
-
- Default server URL: `http://[phone-ip]:22222/dir`
58
+
Communicates with Garmin devices via ConnectIQ SDK:
0 commit comments