In the following library:
com.google.android.gms:play-services-fitness:9.8.0
In the following class: com.google.android.gms.fitness.FitnessActivities
There is this method: public static java.lang.String getName(int i)
However, in the library com.google.android.gms:play-services-fitness:10.2.0
the above mentioned method is removed.
What method to use instead of the above mentioned method?
Can you give us some code? I assume that you have a variable with value X and you want to perform some actions according to this value. If that is the case, I will do that with a switch statement:
switch(myFitnessValue) {
case FitnessActivities.AEROBICS:
doAerobics();
break;
case FitnessActivities.BIKING:
doBiking();
break;
case FitnessActivities.WALKING:
doWalking();
break;
default:
doNothing();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With