The SDK's Health Data provides a FoodNote sample application to show how to manage nutrition data with Samsung Health after the permission request.
Prerequisites to run FoodNote are:
Prepare an Android device that supports Android 6.0 Marshmallow (API level 23) or above.
(Samsung and non-Samsung devices are available both.)
Add the FoodNote app's dev access code developer mode.
Import FoodNote with Android Studio (or Eclipse).
Run FoodNote on the device.
FoodNote demonstrates how to use Health Data's APIs for checking the selected day's food intake with HealthConstants.Nutrition including permission request.
Especially, the health data store connection and exception handling would be helpful to your application to prepare unexpected error.
FoodNote's sources and resources are: