Add permission

After linking the foodnote demo app with the Samsung Health app, we confirmed that the read and write functions are performed.

However, to add the weight permission, I added it to the manifest as described in the document and then added it to generatePermissionKeySet, but the ‘weight’ permission is not added.

The added code is as follows.

    android:name="com.samsung.android.health.permission.write"
    android:value="com.samsung.health.nutrition;com.samsung.health.weight" />



// Add the read and write permissions to Permission KeySet
pmsKeySet.add(new PermissionKey(Weight.HEALTH_DATA_TYPE, PermissionType.WRITE));
pmsKeySet.add(new PermissionKey(Nutrition.HEALTH_DATA_TYPE, PermissionType.READ));
pmsKeySet.add(new PermissionKey(Nutrition.HEALTH_DATA_TYPE, PermissionType.WRITE));

return pmsKeySet;