Would this work? GooglePlay Code

Hi Guys.
Im having a problem with my achievements.
The 5 minutes and 3 minutes achievements are not working.

Is there anything wrong with this code?

    @Override
    public void sendAchievement(final String achievement) {

        try {
            runOnUiThread(new Runnable() {

                @Override
                public void run() {

                    if (!isSignedIn()) {
                        signIn();
                    }

                    GoogleApiClient apiClient = _gameHelper.getApiClient();

                    if (achievement.equalsIgnoreCase("achievement_destroyed_10_asteroids")) {
                        Games.Achievements.unlock(apiClient, getString(R.string.achievement_destroyed_10_asteroids));
                    } else if (achievement.equalsIgnoreCase("achievement_destroyed_30_asteroids")) {
                        Games.Achievements.unlock(apiClient, getString(R.string.achievement_destroyed_10_asteroids));
                        Games.Achievements.unlock(apiClient, getString(R.string.achievement_destroyed_30_asteroids));
                    } else if (achievement.equalsIgnoreCase("achievement_destroyed_50_asteroids")) {
                        Games.Achievements.unlock(apiClient, getString(R.string.achievement_destroyed_10_asteroids));
                        Games.Achievements.unlock(apiClient, getString(R.string.achievement_destroyed_30_asteroids));
                        Games.Achievements.unlock(apiClient, getString(R.string.achievement_destroyed_50_asteroids));
                    }

                    if (achievement.equalsIgnoreCase("achievement_survive_the_asteroid_field_for_1_minute")) {
                        Games.Achievements.unlock(apiClient, getString(R.string.achievement_survive_the_asteroid_field_for_1_minute));
                    } else if (achievement.equalsIgnoreCase("achievement_survive_the_asteroid_field_for_3_minute")) {
                        Games.Achievements.unlock(apiClient, getString(R.string.achievement_survive_the_asteroid_field_for_1_minute));
                        Games.Achievements.unlock(apiClient, getString(R.string.achievement_survive_the_asteroid_field_for_3_minute));
                    } else if (achievement.equalsIgnoreCase("achievement_survive_the_asteroid_field_for_5_minute")) {
                        Games.Achievements.unlock(apiClient, getString(R.string.achievement_survive_the_asteroid_field_for_5_minute));
                        Games.Achievements.unlock(apiClient, getString(R.string.achievement_survive_the_asteroid_field_for_3_minute));
                        Games.Achievements.unlock(apiClient, getString(R.string.achievement_survive_the_asteroid_field_for_1_minute));

                    }

                }
            });
        } catch (Exception ex) {
            Gdx.app.log("MainActivity",
                    "Failed to unlock Achievement! " + ex.getLocalizedMessage());
            ex.printStackTrace();

        }

    }

    @Override
    public void signIn() {

        try {
            runOnUiThread(new Runnable() {

                @Override
                public void run() {
                    _gameHelper.beginUserInitiatedSignIn();

                }
            });
        } catch (Exception ex) {
            Gdx.app.log("MainActivity",
                    "Log-in Failed  " + ex.getLocalizedMessage());
            ex.printStackTrace();
        }

    }

If it doesn’t work, then there’s indeed something wrong with the code.

What did you do to narrow down the problem, apart from noticing it didn’t work and dumping it on JGO.

I checked if the String was equal.
I re-checked the String Resources.
I changed the signIn Code.

~~
Edit :
I changed the way the thread was called
I made the Health = 10000000000f
and i let it running for 5 minutes and made a debug to allow myself to reduce the health to 10.
It seems to be working on my android device.

I hope it will work now.

By the way :
WTF IS THIS?

This is a notification that the minimum content level of your application, Space Escape, with package ID br.lopes.game.android, has been changed to Low Maturity (2) by the Google Play Team after a regular review.

REASON FOR CONTENT LEVEL CHANGE: Violation of the Google Play content rating policy.

These guidelines apply to your app's Play listing, the landing page of your listed developer website and all content in your app, including user generated content, in-app products, and advertisements.

After a regular review, we have determined that your app includes fantasy or graphic violence. The content rating of your app has been changed to reflect this.

Please be advised that additional content rating modifications by the Google Play Team may result in administrative action, up to and including removal of subsequent applications in violation.

All violations are tracked. Serious or repeated violations of any nature will result in the termination of your developer account, and investigation and possible termination of related Google accounts.

We appreciate your contributions towards ensuring an accurate content rating experience for Google Play users.

The Google Play Team

Since when : Destroying asteroids = Violence?

Weird thing happened.
It worked on my tablet, but in my friends tablet didnt.
And also, GooglePlay Console claims no one unlocked that achivement.

Even if you create a game which is about feeding little kittens and add a highscore-table where users can add comments (about what a good person you are as you fed all those poor kittens) your game could be set to Medium Maturity.
Destroying asteriods seems to be intense fictional violence ::slight_smile:
You could write an email to the support but dont expect any response soon :slight_smile: