Search code examples
androidcordovaphonegap-pluginsin-app-billing

Google InAppBilling returns null


I am developing a hybrid mobile app by Cordova 3. For InAppBiling I have used this plugin https://github.com/poiuytrez/AndroidInAppBilling.

I have made a sample just like what is introduced in the site. But in my app when I call inappbilling.init(successHandler, errorHandler, { showLog: true }); the errorHandler is called with error: null


Solution

  • Weired,

    I found there is a java.lang.NullPointerException in line 266 in IabHelper.java. I commented Line 266 as below and every things has become right, can anyone describe this.

            Intent serviceIntent = new Intent("ir.cafebazaar.pardakht.InAppBillingService.BIND");
    //        serviceIntent.setPackage("ir.cafebazaar.pardakht");