Sign In Register

How can we help you today?

Start a new topic
Solved

Java SDK woes

So using the latest Java SDK from bitbucket (version 0.0.3)

I want to do a device authentication. docs (https://api.gamesparks.net/#authenticationrequest) show an example that uses GSEventListener.


import com.gamesparks.sdk.api.GSEventListener;


GSEventListener does not seem to exist in the Java SDK. In fact, the AbstractResponse base class seems to expect a GSEventConsumer to be passed along to the send() builder


 .send(new GSEventListener<AuthenticationResponse>() {
      @Override
      public void onEvent(AuthenticationResponse response) {

 So that's fine - I use that instead.  However - in every onEvent call, the response properties (like authToken and userId) are all null.

Sometimes, I dont even get a callback to the onEvent method at all! (although that might be an issue somewhere else).


Any thoughts?  I know even the oldest commits to this bitbucket repo for this particular SDK are newish (March - so maybe this isn't fleshed out as yet?  Although I assume it is the basis for android users so I am not sure what to think.


Any help would be appreciated.





Well - turns out that the second (most critical aspect) of this was my fault.  The class I created to extend IGSPlatform didn't implement any logic for "executeOnMainThread".  Although the IGSPlatform isn't really documented anywhere clearly, I traced through the SDK code until I figured out where things were fouling up.  Things are working well now!  If you could just confirm that switch from GSEventListener has been superseded by GSEventConsumer, I can close the book on this question and move on!


Thanks!!

Hi Jeff,

Yes, you are right, our documentation needs to be up to date. About the other issue, we were going to ask pieces of your code, but you have already fixed it and so we will not go further with this ticket.


Thank you,

Giuseppe

Hello Jeff Amiel, can you share the code to implements IGSPlatform. Its not documented anywhere on how to implements it. Or can you help to points me somewhere i can read about it.

Thanks

Login to post a comment