Comments (4)
Try the calls using their blocking equivalents. If it works without using callbacks then you likely have a threading issue (specifically this is likely a JNI issue not a GPG issue.) In my case it was the callbacks trying to access/set java side code/views via JNI calls from native code. I got around this by caching the class loader of the JVM for when I made JNI calls in a callback and then attach the callback thread to attach to the main thread and let the call back proceed.
Any easy way to see if the ClassNotFound issue is to avoid making those JNI calls from the c++ callback (you get to be lazy and dodge the complexity.) For testing you can just see if that is the case by not informing the Application framework side (java). In my case it is necessary so I had to fight to get past it (aggressive JNI error handling of Java side exceptions to start with.) I literally don't have time to explain further, but I will try to dig up links that helped me if you think its a thread issue. Keywords/phrases to search:
JNI, JVM, "attaching threads", caching class loaders
We have project differences:
I am not using supporting L (lollipop) yet.
Not using any of the samples except for bits gleaned from it (I integrated it into cocos2d-x framework v2.2.5)
I know log in works, I got leaderboards working, achievements don't save when posted (no errors) and the realtime multiplayer doesn't create games yet 9using quick game examples that abound.) But I have seen authorization work, as well as leaderboards. Those are my only qualifications to speak of at this time...
-Still learning
from cpp-android-basic-samples.
In don't think it was a threading issue.
I can now log in.
I was under the presumption that no manual login action was req'd.
However, at first, the autologin at app start will fail.
Only if you manually request a login, and agree to google+ privacy terms, will you get logged in.
After that, subsequent auto logins do get through.
I still get the undefined class errors though.
I think they may be common and are typically ignored?
from cpp-android-basic-samples.
The log in works, despite the error message on console. So I will just close this.
from cpp-android-basic-samples.
@stolk thanks for working this out. I have not personally seen that log error but according to this user on StackOverflow they are OK to ignore. I'll look into why they are there at all when I get a chance.
from cpp-android-basic-samples.
Related Issues (20)
- Old play games services are used by cpp example code. HOT 3
- Requested ID not returned from GmsCore -- ERROR_INTERNAL
- WaitingRoomUIResponse with too few participants. HOT 3
- Does this mean google play services will not work with ndk r10 or above? HOT 1
- No way of detecting when a RTM player disconnects. HOT 2
- gpgs login error (crash)
- Authentication crash since updating to 3.0.1
- Play Games C++ SDK Version 3.0.1. TurnBasedMatch: Callbacks do not trigger
- Incorrect advice in android_support.h file from SDK.
- Missing x86_64 support in latest Google Play Games C++ SDK 3.0.1 HOT 1
- Play Game Services does not provide an x86_64 library
- Gg
- Compatibility daemon could not be reused HOT 1
- SDK is not compatible with play-services-games newer than 18.0.1 HOT 1
- None of your samples build with the latest NDK and tools
- [BUG] Initialization of GPGS 21 fails with Can't register class com/google/android/gms/games/multiplayer/*: an exception occurred.
- Can´t login in a game.
- Achievements().ShowAllUIBlocking() doesn't return control to my native activity (Android 11)
- Shared data in cloud on Two Different emails accs
- There is no way to get a server auth code using the Play Games C++ SDK
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpp-android-basic-samples.