0

I have created an Android version which includes now the Gluonhq InAppBillingService for purchasing my app under Google Play Store.

This version is loaded in Google Play Developer console.
One tester (myself, with another gmail account) can load this apk version from Google Play Store and can install it.
I run it on my phone with adb for catching some debug traces, especially about the billing API calls.

Test results: The PlayerService is present but never ready. What does that mean?

Thanks in advance


In details:
- I enter in PlayerService.getInstance (). GetService (). IfPresent (service -> {..
- But after, the service is never ready (directly by service.isReady () or not by listening its change)

Here is my code (traceP is only the trace debug method):

PlayerService.getInstance().getService().ifPresent(service -> { 
    traceP("interrogerServeurSurLesLicencesHG - before 1st test service ready"); 
    if (service.isReady()) { 
        updateProductDetailsGPS(service); // affecte bLicence_STD_HG_achetee 
    } else { 
        traceP("interrogerServeurSurLesLicencesHG - before 2nd test service ready"); 
        service.readyProperty().addListener(new ChangeListener<Boolean>() { 
        // se synchroniser avec le seveur de license GPS 
        @Override 
        public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) { 
            traceP("interrogerServeurSurLesLicencesHG - before test newValue"); 
            if (newValue) { 
                traceP("interrogerServeurSurLesLicencesHG - when new value"); 
                updateProductDetailsGPS(service); // affecte bLicence_STD_HG_achetee 
                service.readyProperty().removeListener(this); 
            } 
        } 
    }); 
    } 
});

traceP("Fin interrogerServeurSurListeDesProduitsHG - bInterrogationFaiteAvecSucces " + bInterrogationFaiteAvecSucces);

and the called method updateProductDetailsGPS:

static void updateProductDetailsGPS(InAppBillingService service) { 

    traceP("Deb updateProductDetailsGPS"); 

    BillingGPS.setUpdateStateGPS(StateGPSType.NONE); 
    Worker<List<Product>> productDetails = service.fetchProductDetails(); 
    productDetails.stateProperty().addListener((obs, ov, nv) -> { 
    switch (nv) { 
    case CANCELLED:.....

I catch debug traces in my phone, with adb. The result is:

I/System.out(19417): heure : 157 ms --- interrogerServeurSurLesLicencesHG - billingType: GPS

I/System.out(19417): heure : 162 ms --- interrogerServeurSurLesLicencesHG - before 1st test service ready

I/System.out(19417): heure : 162 ms --- interrogerServeurSurLesLicencesHG - before 2nd test service ready

I/System.out(19417): heure : 163 ms --- Fin interrogerServeurSurListeDesProduitsHG - bInterrogationFaiteAvecSucces false

There is no trace about:
- "interrogerServeurSurLesLicencesHG - before test newValue"
- and "Deb updateProductDetailsGPS"

So the updateProductDetailsGPS method that fetchs product details from the Google server is never called.


Note:
My public key seems to be correctly defined in BASE_64_ANDROID_PUBLIC_KEY.

How can you usually test this kind of integration problem with Google Play server?

For instance, how the InAppBillingSample project has finalized the integration of its billing API (that I use now) and the Google Play server?

Pascal DUTOIT
  • 121
  • 1
  • 13

1 Answers1

0

I don't know anything about Gluonhq, but Google Play has a whole web page on recommended process for testing In-app billing. It's well worth following all the steps there.

Nick Fortescue
  • 13,530
  • 1
  • 31
  • 37
  • My question is not about the test process (that I know) but the way to use for debugging the requests/responses between two devices: an Android phone and the remote Google Play server. Have you already done this kind of integration? – Pascal DUTOIT Aug 16 '18 at 13:35
  • Google Play support says this problem is out of their scope because it is no their billing solution – Pascal DUTOIT Aug 17 '18 at 07:39