Android: How to reset score from Google Play Games leaderboards

[vc_row parallax_image=”” boxed_columns=”” section=”” vertical_centering=”” background=”” img=”” parallax=”” video=”” bg_type=”” parallax_style=”” bg_image_new=”” layer_image=”” bg_image_repeat=”” bg_image_size=”” bg_cstm_size=”” bg_img_attach=”” parallax_sense=”” bg_image_posiiton=”” animation_direction=”” animation_repeat=”” video_url=”” video_url_2=”” u_video_url=”” video_opts=”” video_poster=”” u_start_time=”” u_stop_time=”” viewport_vdo=”” enable_controls=”” bg_override=”” disable_on_mobile_img_parallax=”” parallax_content=”parallax_content_value” parallax_content_sense=”” fadeout_row=”” fadeout_start_effect=”” enable_overlay=”” overlay_color=”” overlay_pattern=”” overlay_pattern_opacity=”” overlay_pattern_size=”” overlay_pattern_attachment=”” multi_color_overlay=”” multi_color_overlay_opacity=”” seperator_enable=”” seperator_type=”” seperator_position=”” seperator_shape_size=”” seperator_svg_height=”” seperator_shape_background=”” seperator_shape_border=”” seperator_shape_border_color=”” seperator_shape_border_width=”” icon_type=”” icon=”” icon_size=”” icon_color=”” icon_style=”” icon_color_bg=”” icon_border_style=”” icon_color_border=”” icon_border_size=”” icon_border_radius=”” icon_border_spacing=”” icon_img=”” img_width=”” ult_hide_row=”” ult_hide_row_large_screen=”” ult_hide_row_desktop=”” ult_hide_row_tablet=”” ult_hide_row_tablet_small=”” ult_hide_row_mobile=”” ult_hide_row_mobile_large=”” height=”medium” color_scheme=”” us_bg_color=”” us_text_color=”” us_bg_image=”” us_bg_video=”0″][vc_column animate=”afl” animate_delay=”0.2″ width=”1/1″ css=”%7B%22default%22%3A%7B%22background-color%22%3A%22%22%7D%7D”][vc_column_text]Recently I had to work with Leaderboards and scores for our new game QuickAZ. So while I was developing and testing the game, my scores were registered to Leaderboards, which was a good thing :D.

RESET THE SCORE BEFORE PUBLISHING

But, before publishing the game, I wanted to reset my score. In this phase is pretty easy to reset the score. You have to open your Google Play Developer Console – Go to Game Services – Select Leaderboards – Select Your Leaderboard – click the button labeled “Delete” at the bottom of the page.

RESET THE SCORE AFTER PUBLISHING

Well, in this phase, the reset is not so straightforward. After I published my game, I started fixing a few bugs and I did something that altered my score, so I needed to delete it from Leaderboards. I spent a lot of time searching on the internet how to do that and in the end I found this solution that I hope will help you guys to save some time.

1. Tools needed

2. Link your app

You have to have your app linked to OAuth 2.0 Playground. In order to do that you just have to make sure that you have your email in the TEST list in the Game Services from Developer Console and after that, follow the steps from this tutorial.

3. Reset score request 

Now that you have your app linked, and learned from the previous tutorial how to use playground, you just have to get your Leaderboard id from  Google Play Developer Console and add the following request in the OAuth 2.0 Playground page:

get leaderboard id

POST https://www.googleapis.com/games/v1management/leaderboards/leaderboardId/scores/reset

E.g.

POST https://www.googleapis.com/games/v1management/leaderboards/Cfk65GCgfj8/scores/reset

reset leaderboard score

The above example will reset all scores for the leaderboard with the given ID for the currently authenticated player. For more types of reset requests visit https://developers.google.com/games/services/management/api/scores

After you send the request you can open your leaderboards from your app and you will notice that your score has disappeared.

I hope this tutorial will help you![/vc_column_text][/vc_column][/vc_row]

Scroll to Top