expo-healthkit-module
Version:
Expo module providing Apple HealthKit / Android Health Connect integration for RN / expo apps.
30 lines • 878 B
JavaScript
import { NativeModule, registerWebModule } from "expo";
class ExpoHealthkitModule extends NativeModule {
PI = Math.PI;
async setValueAsync(value) {
this.emit("onChange", { value });
}
hello() {
return "Hello world! 👋";
}
async authorizeHealthKit() {
return {
success: false,
granted: [],
denied: [],
error: "Health data is not available on web platform.",
};
}
async getHealthData(options) {
return {
success: false,
data: [],
error: {
code: "unsupported_platform",
message: "Health data is not available on web platform.",
},
};
}
}
export default registerWebModule(ExpoHealthkitModule, "ExpoHealthkitModule");
//# sourceMappingURL=ExpoHealthkitModule.web.js.map