09-10-2019 07:52 - edited 09-10-2019 14:05
09-10-2019 07:52 - edited 09-10-2019 14:05
I've been searching the threads and haven't been able to find any answers, so I hope I'm not repeating an issue.
Note: I am using VS Code and CLI to develop with.
I am putting some settings into settingsStorage that will be used in the Settings page to determine whether or not to display certain items.
In my companion/index.js I have the import line: import { me } from "companion";
Then to set my values I use :
settingsStorage.setItem("accessactivity", getPermission("access_activity"));
getPermission is a function:
function getPermission(requestedAccess) {
if (me.permissions.granted(requestedAccess)) {
return true;
} else {
return false;
}
}
When the call is made, I get the response - Companion: The 'permission' API is not yet supported in the Fitbit OS Simulator. Behavior may not match the documentation or real devices.
All of the values returned are undefined.
Is there a fix? I am using these values to dynamically change the settings displayed on the Companion Settings page based on whether or not the sensor is present and/or permission has been granted.
Thanks for any help with this!!
04-24-2021 23:02 - edited 04-24-2021 23:04
04-24-2021 23:02 - edited 04-24-2021 23:04
Have you found a fix? I defined access_internet in package.json and it works fine on real device, but not in simulator. The same error.
"requestedPermissions": [
"access_internet"
],
@JonFitbit - any clue?
Thanks.
04-24-2021 23:53
04-24-2021 23:53
The warning about permissions not being implemented may not be a problem for you. It just means that the sim won't attempt to block anything for which it doesn't have permission.