Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
android:vmSafeMode="true">
>
<!-- Play service metadata -->
<meta-data
<!-- TODO: Enable this once we integrate with Samsung Health -->
<!-- <meta-data
android:name="com.google.android.gms.version;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really sure what this metadata is used for, but we don't need this line android:name="com.google.android.gms.version"? Or is it somehow just used for the Samsung Health?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's only be used for Samsung Health. If I compare the manifest file with with GoogleFit example here:
https://github.com/android/fit-samples/blob/master/BasicHistoryApiKotlin/app/src/main/AndroidManifest.xml

meta-data is not required at all for GoogleFit. But let me double check it by run the example project to ensure I'm not mess anything up. 😥

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

com.samsung.android.health.permission.read"
android:value="com.samsung.health.step_count;
Expand All @@ -27,7 +28,7 @@
com.samsung.health.blood_pressure;
com.samsung.health.weight;
@integer/google_play_services_version;"
/>
/> -->

<!-- Receiver -->
<receiver android:name=".service.broadcasts.BootReceiver">
Expand Down
10 changes: 6 additions & 4 deletions android/src/main/java/nl/sense/rninputkit/inputkit/InputKit.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import nl.sense.rninputkit.inputkit.entity.SensorDataPoint;
import nl.sense.rninputkit.inputkit.entity.StepContent;
import nl.sense.rninputkit.inputkit.entity.Weight;
import nl.sense.rninputkit.inputkit.shealth.SamsungHealthProvider;
// import nl.sense.rninputkit.inputkit.shealth.SamsungHealthProvider;
import nl.sense.rninputkit.inputkit.status.IKResultInfo;
import nl.sense.rninputkit.inputkit.status.IKProviderInfo;
import nl.sense.rninputkit.inputkit.googlefit.GoogleFitHealthProvider;
Expand Down Expand Up @@ -82,7 +82,8 @@ public interface Callback {

private InputKit(@NonNull Context context) {
mGoogleFitHealthProvider = new GoogleFitHealthProvider(context, this);
mSamsungHealthProvider = new SamsungHealthProvider(context);
// TODO: Enable this only when we want to integrate with Samsung Health
// mSamsungHealthProvider = new SamsungHealthProvider(context);

// By default it will use Google Fit Health provider
mCurrentHealthProvider = mGoogleFitHealthProvider;
Expand Down Expand Up @@ -120,8 +121,9 @@ public void setHealthProvider(@NonNull ProviderType healthProvider) {
case GOOGLE_FIT: mCurrentHealthProvider = mGoogleFitHealthProvider;
break;
case SAMSUNG_HEALTH:
mCurrentHealthProvider = mSamsungHealthProvider;
break;
// TODO: Enable this only when we want to integrate with Samsung Health
// mCurrentHealthProvider = mSamsungHealthProvider;
// break;
case GARMIN_SDK:
default:
mCurrentHealthProvider = mGoogleFitHealthProvider;
Expand Down