I am trying to integrate In app billing v3 in my app. I call the following function to initialize.
public static void SetupInappBilling()
{
mHelper = new IabHelper(context, base64EncodedPublicKey);
mHelper.enableDebugLogging(true);
mHelper.startSetup(new IabHelper.OnIabSetupFinishedListener()
{
public void onIabSetupFinished(IabResult result)
{
if (result.isSuccess())
{
Log.e("tag", "connected");
ConnectionEstablished = true;
}
else
{
Log.e("tag", "not connected");
ConnectionEstablished = false;
}
}
});
}
but i dont get call back in OnIabSetupFinishedListener Can anyone tell me how to fix this issue
As discussed, the example
IabHelper
implementation ignores the return value of thebindService()
call.bindService()
returnsfalse
if it cannot bind to the Service. In this case, no callbacks will ever get called. In this respect, the return value ofbindService()
is essential for the program logic and should never be ignored; the example application is not exactly perfect here.If I recall this correctly, conditions where binding to the IAB V3 will not work are: