Hello sir,
I am using corona from last few years and my inapps were working fine everytime.
Now from the day it is free i am not getting how it will work for me.
1: I have created an app on google play and create a product there.
2: Then in code i am using first:
local store = require( “store” )
if ( system.getInfo( “platformName” ) == “Android” ) then
print(“plugin found here\n\n”)
store = require( “plugin.google.iap.v3” )
elseif ( system.getInfo( “platformName” ) == “iPhone OS” ) then
store = require( “store” )
end
3: Then in create scene i am using:
if ( system.getInfo( “platformName” ) == “Android” ) then
print(“initialized done here\n\n”)
store.init( transactionCallback )
elseif ( system.getInfo( “platformName” ) == “iPhone OS” ) then
store.init( “apple”, transactionCallback )
else
local alert = native.showAlert( “Ration Rush”, " Store is not available", {“Ok”} )
end
4: On clicking button, i am using
store.purchase( {“demoproduct”} ) – demoproduct is my product id.
5: Its doing nothing for me, in log cat it is showing a warning as:
I/Corona (4291):
W/System.err(4291): at com.ansca.corona.CoronaLua.dispatchEvent(CoronaLua.java:100)
W/System.err(4291): at com.ansca.corona.CoronaRuntimeTaskDispatcher$TaskEvent.Send(CoronaRuntimeTaskDispatcher.java:148)
W/System.err(4291): at com.ansca.corona.events.EventManager.sendEvents(EventManager.java:87)
W/System.err(4291): at com.ansca.corona.Controller.updateRuntimeState(Controller.java:281)
W/System.err(4291): at com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onDrawFrame(CoronaGLSurfaceView.java:417)
W/System.err(4291): at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1622)
W/System.err(4291): at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1377)
I have given all permissions in build and have given key in config also.
I am also using plugin in build as:
[“plugin.google.iap.v3”] =
{
publisherId = “com.coronalabs”,
supportedPlatforms = { android=true }
},
Please help me and tell me whats wrong with my code and why it is not working.
Thanks in Advance