0

I'm trying to implement the PlayScape SDK into GameMaker: Studio. I've followed the native Android integration guide and, after some work, got it to build without errors. However, I am getting an error message when I try to open the Playscape Exchange catalog and I'm not sure what it means.

I'm currently using the following code:

package ${YYAndroidPackageName};

import ${YYAndroidPackageName}.RunnerActivity;
import com.yoyogames.runner.RunnerJNILib;
//Some more general imports go here

import com.playscape.exchange.ExchangeManager;

public class GMPlayscape extends ExtensionBase
{
    public void showExchange()
    {
        RunnerActivity.ViewHandler.post( new Runnable()
        {
            public void run() 
            {
                ExchangeManager.getInstance().showCatalog();
            }
        });
    }
}

After calling showExchange() from my own code, I'm getting the following error:

E/AndroidRuntime(17482):  FATAL EXCEPTION: main
E/AndroidRuntime(17482):  Process: com.companyname.Playscape_For_Android, PID: 17482
E/AndroidRuntime(17482):  java.lang.NullPointerException: Attempt to invoke interface method 'void java.util.concurrent.ExecutorService.execute(java.lang.Runnable)' on a null object reference
E/AndroidRuntime(17482):   at com.playscape.exchange.ExchangeManager.showCatalog(ExchangeManager.java:99)
E/AndroidRuntime(17482):   at com.companyname.Playscape_For_Android.GMPlayscape$1.run(GMPlayscape.java:38)
E/AndroidRuntime(17482):   at android.os.Handler.handleCallback(Handler.java:739)
E/AndroidRuntime(17482):   at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime(17482):   at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(17482):   at android.app.ActivityThread.main(ActivityThread.java:5343)
E/AndroidRuntime(17482):   at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(17482):   at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(17482):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)
E/AndroidRuntime(17482):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)

After this, the application crashes. What am I doing wrong here?

Florian
  • 3
  • 3
  • We'll need more information to process this. What is your build system? and what IDE are you using? – Zvi Aug 25 '15 at 09:56
  • @Zvi I'm using GameMaker: Studio, which uses a special language (GML) for normal coding of the game. I'm adding the Playscape functionality though an extension, which is a built-in way to add SDKs and Java code to a game. More information about extensions can be found [here](http://help.yoyogames.com/entries/30690273-Creating-A-Native-Extension-For-Android-GMS-v1-3-). GameMaker: Studio uses the ant build system. – Florian Aug 26 '15 at 08:28

1 Answers1

0

This issues was identified as a bug in the SDK. It was fixed with Playscape publishing kit 1.15.