Module: Toybox.PersistedContent
Overview
The PersistedContent module allows access to stored routes, waypoints, and other stored user data.
This module provides an Iterator class that gives access to content stored on the device. Included content types are as follows:
Each of these objects can utilize System.Intents to to launch the appropriate application type for the content type (e.g. The workout might launch the workout player). This is typically used in conjunction with the Communications module to retrieve content of type .FIT and .GPX and later access it using the get methods provided within this module.
See Also:
As a general rule, Fitness and Edge devices will support .FIT format. Outdoor devices will support .GPX format.
Classes Under Namespace
Classes: Course, Iterator, Route, Track, Waypoint, Workout
Typedef Summary collapse
-
Content as interface {
function getName() as Lang.String;
function getId() as Lang.Number;
function toIntent() as System.Intent;
function remove() as Void;
}
Instance Method Summary collapse
-
getAppCourses() as PersistedContent.Iterator
Get the subset of courses installed on the system that are owned by the application.
-
getAppRoutes() as PersistedContent.Iterator
Get the subset of routes installed on the system that are owned by the application.
-
getAppTracks() as PersistedContent.Iterator
Get the subset of tracks installed on the system that are owned by the application.
-
getAppWaypoints() as PersistedContent.Iterator
Get the subset of waypoints installed on the system that are owned by the application.
-
getAppWorkouts() as PersistedContent.Iterator
Get the subset of workouts installed on the system that are owned by the application.
-
getCourses() as PersistedContent.Iterator
Get the courses installed on the system.
-
getRoutes() as PersistedContent.Iterator
Get the routes installed on the system.
-
getTracks() as PersistedContent.Iterator
Get the tracks installed on the system.
-
getWaypoints() as PersistedContent.Iterator
Get the waypoints installed on the system.
-
getWorkouts() as PersistedContent.Iterator
Get the workouts installed on the system.
- saveWaypoint(location as Position.Location, options as { :name as Lang.String } or Null) as Void
Instance Method Details
getAppCourses() as PersistedContent.Iterator
Get the subset of courses installed on the system that are owned by the application
getAppRoutes() as PersistedContent.Iterator
Get the subset of routes installed on the system that are owned by the application
getAppTracks() as PersistedContent.Iterator
Get the subset of tracks installed on the system that are owned by the application
getAppWaypoints() as PersistedContent.Iterator
Get the subset of waypoints installed on the system that are owned by the application
getAppWorkouts() as PersistedContent.Iterator
Get the subset of workouts installed on the system that are owned by the application
getCourses() as PersistedContent.Iterator
Get the courses installed on the system
getRoutes() as PersistedContent.Iterator
Get the routes installed on the system
getTracks() as PersistedContent.Iterator
Get the tracks installed on the system
getWaypoints() as PersistedContent.Iterator
Get the waypoints installed on the system
getWorkouts() as PersistedContent.Iterator
Get the workouts installed on the system