Android App Crash on sponsorpay.setShowMBERewardNotification( false ) call

Function call: sponsorpay.setShowMBERewardNotification( false )

Corona Version: 2013.1257 (2013.11.7)

Platforms affected: Android

Galaxy Tab 3.8.0 T311, Android 4.2.2

NOTE: the function works on iOS. Commenting the function prevents app from crashing.

Logcat:

V/Corona (12189): Loading via reflection: plugin.sponsorpay.LuaLoader I/Corona (12189): Runtime error I/Corona (12189): ...s/piotr/Work/\_git/yolkeys/Humper/SponsorpayWrap.lua:14: java.lang.ExceptionInInitializerError I/Corona (12189): Java Stack Trace: I/Corona (12189): plugin.sponsorpay.functions.SPMBERewardNotificationWrapper.doInvoke(SPMBERewardNotificationWrapper.java:22) I/Corona (12189): plugin.sponsorpay.functions.SPAbstractSDKNamedFunction.invoke(SPAbstractSDKNamedFunction.java:23) I/Corona (12189): com.ansca.corona.JavaToNativeShim.nativeResize(Native Method) I/Corona (12189): com.ansca.corona.JavaToNativeShim.resize(JavaToNativeShim.java:317) I/Corona (12189): com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onSurfaceChanged(CoronaGLSurfaceView.java:355) I/Corona (12189): com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1611) I/Corona (12189): com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1377) I/Corona (12189): stack traceback: I/Corona (12189): [C]: ? I/Corona (12189): [C]: in function 'setShowMBERewardNotification' I/Corona (12189): ...s/piotr/Work/\_git/yolkeys/Humper/SponsorpayWrap.lua:14: in function 'init' I/Corona (12189): ...s/piotr/Work/\_git/yolkeys/Humper/SponsorpayWrap.lua:60: in main chunk I/Corona (12189): [C]: in function 'require' I/Corona (12189): I/Corona (12189): Runtime error I/Corona (12189): I/Corona (12189): stack traceback: I/Corona (12189): [C]: ? I/Corona (12189): [C]: in function 'setShowMBERewardNotification' I/Corona (12189): ...s/piotr/Work/\_git/yolkeys/Humper/SponsorpayWrap.lua:14: in function 'init' I/Corona (12189): ...s/piotr/Work/\_git/yolkeys/Humper/SponsorpayWrap.lua:60: in main chunk I/Corona (12189): [C]: in function 'require' I/Corona (12189): ?: in function 'require' I/Corona (12189): /Users/piotr/Work/\_git/yolkeys/Humper/sSummary.lua:14: in main chunk I/Corona (12189): [C]: in function 'require' I/Corona (12189): ?: in function 'require' I/Corona (12189): ...rs/piotr/Work/\_git/yolkeys/Humper/ScreenManager.lua:4: in main chunk I/Corona (12189): [C]: in function 'require' I/Corona (12189): ?: in function 'require' I/Corona (12189): /Users/piotr/Work/\_git/yolkeys/Humper/main.lua:82: in main chunk

It turned out that source of the problem was me trying to use the plugin immediately after calling sponsorpay.start( appId, userId, securityToken ). Using timer.performWithDelay() fixed all the issues.

It turned out that source of the problem was me trying to use the plugin immediately after calling sponsorpay.start( appId, userId, securityToken ). Using timer.performWithDelay() fixed all the issues.