GpxParser

class GpxParser @Inject constructor : TrackParser

Parser implementation for GPX files. Reads GPX XML data from the provided Uri and converts it to an ImportedTrack.

Constructors

Link copied to clipboard
@Inject
constructor()

Functions

Link copied to clipboard
open override fun canHandle(fileUri: Uri): Boolean

Checks if the file Uri corresponds to a GPX file by extension.

Link copied to clipboard
open suspend override fun parse(context: Context, fileUri: Uri, fileSize: Long, chunkSize: Int): Flow<ParsedData>

Parses the GPX file, extracting track name and waypoints. Handles XML parsing exceptions and returns null if parsing fails.