android - SharedPreferences is Safe for saving highscores -
well using google play service , have leaderboard. putting highscores sharedpreferences. is safe prevent changing highscores external?
i publishing highscores this:
sharedpreferences sp= mcontext.getsharedpreferences( "com.example", context.mode_private); string highscore= (sp.getlong("highscore", 0));
and updating leaderboard on google play service:
games.leaderboards.submitscore(getapiclient(), getstring(r.string.leaderboard_example), highscore);
you can use approach, add encryption on data. simplest make string base64. or strong way aes or other want , save shared prefrences.
its little overhead on app security aspect covered fulfills gap. if want can add code of baase64 & aes here.
Comments
Post a Comment