This repository has been archived by the owner on Dec 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 658
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Introduce a contract class for all constants - Provide the device as parameter and try to connect to that - Do not overwrite buffered_sample if info is bogus - Bogus Measurements with -1 HeartRate should not trigger contentobservers - Send HeartRate, Steps and Battery Level to callers
- Loading branch information
Benedikt Elser
committed
Jul 6, 2018
1 parent
597076b
commit 7c3ee13
Showing
3 changed files
with
132 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
.../java/nodomain/freeyourgadget/gadgetbridge/contentprovider/HRContentProviderContract.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package nodomain.freeyourgadget.gadgetbridge.contentprovider; | ||
|
||
import android.net.Uri; | ||
|
||
public final class HRContentProviderContract { | ||
public static final String[] deviceColumnNames = new String[]{"Name", "Model", "Address"}; | ||
public static final String[] activityColumnNames = new String[]{"Status", "Message"}; | ||
public static final String[] realtimeColumnNames = new String[]{"Status", "Heartrate", "Steps", "Battery"}; | ||
|
||
static final String AUTHORITY = "com.gadgetbridge.heartrate.provider"; | ||
|
||
static final String ACTIVITY_START_URL = "content://" + AUTHORITY + "/activity_start"; | ||
static final String ACTIVITY_STOP_URL = "content://" + AUTHORITY + "/activity_stop"; | ||
static final String REALTIME_URL = "content://" + AUTHORITY + "/realtime"; | ||
static final String DEVICES_URL = "content://" + AUTHORITY + "/devices"; | ||
|
||
public static final Uri ACTIVITY_START_URI = Uri.parse(ACTIVITY_START_URL); | ||
public static final Uri ACTIVITY_STOP_URI = Uri.parse(ACTIVITY_STOP_URL); | ||
public static final Uri REALTIME_URI = Uri.parse(REALTIME_URL); | ||
public static final Uri DEVICES_URI = Uri.parse(DEVICES_URL); | ||
} |
Oops, something went wrong.