I'm using Android Studio and I have Google Play services rev.25 installed. I was playing around with the Fitness API. Documentation claims that there should be DataType.TYPE_NUTRITION but what I see instead is following
zzYW = new DataType("com.google.nutrition.meal", new Field[]{Field.zzZi, Field.FIELD_CALORIES, Field.zzZj, Field.zzZk, Field.zzZl, Field.zzZm, Field.zzZn, Field.zzZo, Field.zzZp, Field.zzZq, Field.zzZr, Field.zzZs, Field.zzZt, Field.zzZu, Field.zzZv, Field.zzZw, Field.zzZx, Field.zzZy});
The nutrition stuff in both DataType and Field seems to be obfuscated for some reason. What puzzles me is that when I use the obfuscated values and deploy app to my phone it works... I assumed there was something wrong with my copy of SDK but the phone seems to have the API obfuscated as well...
Also strange that the type should be com.google.nutrition
but there is no such thing in my (decompiled) DataType. I'm pretty sure I'm doing something wrong but no clue what that is...
ok.. funny... had to post question here to realize where the problem was... maybe it will help someone...
The problem was that I declared requirement for play services 7.0.0 where the nutrition was not available. Changing the gradle build dependencies to following resolved the "problem"
compile 'com.google.android.gms:play-services:7.5.0'