Data | FoodNote
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.
- Client ID: com.samsung.android.app.foodnote
- Access code: Qeca0ZBM
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:
|Source / Resource||Description|
|AndroidManifest.xml||Declaring required permissions with the
|AppConstants.java||Getting the meal type name.|
|ChooseFoodActivity.java||Loading the food list of the
|FoodInfoTable.java||Defining sample food information.|
|MainActivity.java||FoodNote's main activity.