Error in PoyntOS Code Samples - NullPointerException

So I’m running Poynt Code Samples (the codesamples project/module) from the GitHub project, and I’m trying to learn how to simulate a transaction to be sent through Poynt’s servers and return back a status code.

In codesamples -> java -> co.poynt.samples.codesamples -> PaymentActivity.java, it goes from OnCreate -> launchPoyntPayment() when I click the “Pay Order” button.

I click it, and the app crashes. The log says this:

Process: co.poynt.services, PID: 30123
java.lang.RuntimeException: Unable to start activity ComponentInfo{co.poynt.services/co.poynt.services.payments.PoyntPaymentActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at co.poynt.services.payments.PoyntPaymentActivity.reportPaymentSessionStart(PoyntPaymentActivity.java:168)
at co.poynt.services.payments.PoyntPaymentActivity.handleIntent(PoyntPaymentActivity.java:87)
at co.poynt.services.payments.PoyntPaymentActivity.onCreate(PoyntPaymentActivity.java:49)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)

I think this is a problem inside Poynt’s SDK, but I’m not sure. Help?

Thanks!

So, I figured out that whenever my code tries to bring up the Poynt Payment Fragment, it crashes. I’m running this on the Poynt Android emulator in Android Studio. Theoretically, the fragment should still pop up. Will the code work if it is run on a real Poynt terminal?

let me send you updated emulator files

@dennis didnt receive them

I have sent in a private message just now.

Hi Dennis,

Could you please send me the latest simulator files as well?

Best