Code Monkey home page Code Monkey logo

Comments (4)

orionnoir avatar orionnoir commented on August 23, 2024

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.

stolk avatar stolk commented on August 23, 2024

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.

stolk avatar stolk commented on August 23, 2024

The log in works, despite the error message on console. So I will just close this.

from cpp-android-basic-samples.

samtstern avatar samtstern commented on August 23, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.