useEffect(()=>{
health();
},[])
const health = async() => {
try{
const auth = await RNSamsungHealth.authorize();
let startDate = new Date().setDate(new Date().getDate()-30); // 30 days back date
let endDate = new Date().getTime(); //today's date
let opt = {startDate, endDate};
const steps = await RNSamsungHealth.getDailyStepCount(opt);
}catch(error){
console.log("error ", error)
}
}`
we need sleep, steps and step_daily_trend data in response.
AndroidManifest.xml
![Screenshot_2023_0324_123205](https://user-images.githubusercontent.com/117064446/227448822-ba1c5b73-a9d1-44c9-955e-7d1b85692084.jpg)
If anyone has any solution to fix this issue then please suggest and share with us and help us to resolve this issue. For us it's really important to fix this issue. Thanks!!
we are getting the following error when the user clicks on all the permissions or select permissions one by one.
ERROR: {"nativeStackAndroid":[],"userInfo":null,"message":"Permisson canceled","code":"EUNSPECIFIED","line":2110,"column":45,"sourceURL":"http://localhost:8081/index.bundle?platform=android&dev=true&minify=false&app=com.centavizer&modulesOnly=false&runModule=true"}
` import RNSamsungHealth from 'rn-samsung-health'