libgdx / gdx-pay

A libGDX cross-platform API for InApp purchasing.
Apache License 2.0
225 stars 83 forks source link

Android Failed to Bind to Service (Again) #129

Closed fat2019 closed 6 years ago

fat2019 commented 7 years ago

But this time not on start. I open the game, then click "rate" button and play store opens. When I close play store, game crashes. In the method

   public void handleInstallError (Throwable e) {
        Gdx.app.log("ERROR", "PurchaseObserver: handleInstallError!: " + e.getMessage());
        throw new GdxRuntimeException(e);
    }

I've just commented out the line throw new GdxRuntimeException(e); and now it doesn't kick me out of the application which works ok for me. The throw new GdxRuntimeException(e); is making the application to completely stop working so it might be a good idea to be fixed.

keesvandieren commented 7 years ago

In handleInstallError, you should not throw an Exception.

I know a few situations wherein this can happen:

In our case, we report 'handleInstallErrors' to our tracking system, to see which users install our free app but have no access to in-app purchases.

keesvandieren commented 6 years ago

It is legitimate that handleInstallError is called; do not throw an exception when it is called, log it to Crash reporter or something like that.