mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-03 01:53:05 +02:00
59a05262a1
ImportAllTracks is essentially just a modification of ExportAllTracks that uses the existing GpxImporter to import all GPX files found in /sdcard/MyTracks/gpx. So that the import functionality can always be accessed, the MyTracks Activity's MenuManager is altered so that the Tracks button shows regardless of whether there are any tracks in the database (ImportAllTracks is launched by a button in the lower right of the MyTracksList activity). A Toast message shows if no GPX files are found; this serves as a hint to users on where to put GPX files for import so that this addition should be discoverable and useable without documentation. Im
53 lines
1.5 KiB
Protocol Buffer
53 lines
1.5 KiB
Protocol Buffer
// Copyright 2010 Google Inc.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
|
// use this file except in compliance with the License. You may obtain a copy of
|
|
// the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
// License for the specific language governing permissions and limitations under
|
|
// the License.
|
|
|
|
package com.google.android.apps.mytracks.content;
|
|
|
|
option optimize_for = LITE_RUNTIME;
|
|
|
|
// An enumeration of the state of a single sensor.
|
|
enum SensorState {
|
|
// There is no sensor.
|
|
NONE = 1;
|
|
|
|
// Now initiating an outgoing connection.
|
|
CONNECTING = 2;
|
|
|
|
// Now connected to a remote device.
|
|
CONNECTED = 3;
|
|
|
|
// A state where the sensor is not connected.
|
|
DISCONNECTED = 4;
|
|
|
|
// This is the only state where the sensor data can be used.
|
|
SENDING = 5;
|
|
};
|
|
|
|
// The state and possible reading for one integer sensor.
|
|
message SensorData {
|
|
required SensorState state = 1 [default = NONE];
|
|
|
|
// Value is only defined if state = SENDING.
|
|
optional int32 value = 2;
|
|
};
|
|
|
|
// A message to encapsulate sensor readings associated with a track point.
|
|
message SensorDataSet {
|
|
// This is a required field.
|
|
optional uint64 creation_time = 1 [default = 0];
|
|
|
|
optional SensorData heart_rate = 2;
|
|
optional SensorData cadence = 3;
|
|
optional SensorData power = 4;
|
|
} |