Tricks to Fix Google Play Service Bugs

Download PDF
Tricks to Fix Google Play Service Bugs | Magora-Systems

Registering a game in the Google Play service may seem mistakenly easy. However, users come across some pitfalls. This article is a short guide on how to fix Google Play service errors.

First of all, you should read the Google tutorial. After reading this guide you may try to register a project example from that tutorial. You hope to see your program leaderboard, but instead…. “Unknown error”. You are asking yourself: “Oh Jesus, what have I done wrong?!” You are looking for an answer in the tutorial but can’t find it. After several hours of fruitless search you realise that the answer cannot be found anywhere. You call the wrath of gods upon the heads of the Google programmers who played this joke about the service and documentation. Breathe in. Let’s figure out together what is wrong.

The unclear message with an unknown error appears. That’s why we’ll be better off looking into the program logs. We will see a more detailed message regarding the error in the LogCat. However, you should note that the message tag is different from your program’s tag. This message contains human readable text and the error code. The text can provide us with information about what has actually happened. Our program has not been registered.

Now let’s switch from the Developer Console to the Google APIs Console page. We can see that, basically, only namespace and SHA1 hash are used for program registration. We can say with confidence that the namespace of our program has not been changed, so SHA1 has to be the problem. Let’s compare the SHA1 hash that is shown in the Developer Console to the program’s hash to see if they are actually different. We can get the program hash using the “keytools” utility, or, if you are using the ADT latest version, you can see it when you are signing your program. So let’s compare two SHA1. Just as we predicted they are different. So the problem is that the SHA1 hash of our program is not calculated correctly by the Developer Console. Let’s replace it with a correct one during the registration process. Now let’s start the program again and … Voila! We see the light – I mean our program’s leaderboard!

Note 1: this information is relevant to Monday, June 3rd. It might be that by the time you read this article, Google will have already fixed this bug.

Note 2: A little bonus for guys who are using Cocos2d-x framework. You can use the Google Play service through JNI. Just implement the BaseGameActivity abstract class and its methods. They are clearly named and you can figure out what they do without any effort. Simply call these class methods through the JNI and that’s it.

Chief Product Officer
With a passion for innovation and a keen understanding of market trends, Alexander plays a pivotal role in shaping Magora's product development strategy and ensuring the delivery of cutting-edge solutions to clients.
open
related
How accidentally not to block Google Analytics on your site Google Analytics: Get Ready for Google’s Cross-Device Remarketing Chrome Is Becoming Faster: New Update from Google 9 Common Google Analytics’ Errors: How to Fix Them
recent
3 Ways AI is Shaping the Future of Sustainability How to Develop an AI Chatbot for Your Real Estate Business Generational nuances: crafting the user experience in 2024 VisionOS App Development: The Era of Spatial Computing
recommended
Everything You Want to Know About Mobile App Development App Development Calculator Infographics: Magora development process Dictionary
categories
News Technologies Design Business Development HealthTech IoT AI/ML PropTech FinTech EdTech Mobile Apps Discovery Transport&Logistics AR/VR Big Data Sustainability Startup Enterprise Security
Logo Magora LTD
close
Thank you very much.
Magora team

Grab your e-book: Design to attract more buyers

Logo Magora LTD
close
Get in touch
Open list
Open list
Logo Magora LTD
close
Thank you very much.

Your registration to the webinar on the 27th of September at 2 p.m. BST was successfuly completed.
We will send you a reminder on the day before the event.
Magora team
Registration for a webinar

"Let Smart Bots Speed up your Business"
Date: 27.09.2018 Time: 2 p.m. BST
Do you agree to the personal data processing?


Logo Magora LTD
close
Download our curated selection of resources for accelerating your software development journey.