How to add gained xp and achievements to google game profile?
<p>I have made a gaming app, and published it on google store and I have added google achievement xp to my app, but there is no guide on internet that I can find that should add player's earned xp on the google play game profile and also it(google game app) not showing achievements and xp it only shows the leaderboard.</p>

<p>Here is my code :-</p>

<pre><code>void giveAchievements(int counter) {
if (counter == 10) {   
    int xp = getXp();
    xp += 500;
    saveXp(xp);
    if(getApiClient().isConnected()) {
        Games.Achievements.unlock(getApiClient(),   getString(R.string.achievement_first_10_clicks));   
        Games.Leaderboards.submitScoreImmediate(getApiClient(), "CgkI-    eXOwZsFEAIQBg", counter);
    }
}
}

private int getXp() {
SharedPreferences sharedPref =   PreferenceManager.getDefaultSharedPreferences(this);
return sharedPref.getInt("xp", 0);
}

private void saveXp(int xp) {
SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);
SharedPreferences.Editor editor = sharedPref.edit();
editor.putInt("xp", xp);
editor.apply();
}
</code></pre>

<p>Here is the image of achievements inside my app<a href="https://i.stack.imgur.com/ZcrOw.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZcrOw.jpg" alt="image of achievements"></a></p>

<p>And here in the google play profile the xp doesn't add to the profile and also here the app's achievements section is not showing:-
<a href="https://i.stack.imgur.com/Dbyq2.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Dbyq2.jpg" alt="Game profile that don&#39;t contain xp additions and achievements"></a> </p>