android - Submitting double values to Google Play service's LeaderBoard -
well , want submit value double leaderboard in google play service says submit method "long value"
games.leaderboards.submitscore
void com.google.android.gms.games.leaderboard.leaderboards.submitscore(googleapiclient arg0, string arg1, long arg2)
so how how can submit double or float values?
for both double
, float
, can cast on long
this:
long arg2 = (long) yourdoubleorfloat;
however, keep in mind both double
, float
unprecise, floating point numbers. may want using int
's.
Comments
Post a Comment