godot-sdk-integrations / godot-google-play-billing

Godot Android plugin for the Google Play Billing library
MIT License
147 stars 46 forks source link

fixes bug subscription_offer_details=null #58

Open PickleJesus123 opened 10 months ago

PickleJesus123 commented 10 months ago

This fixes an issue with subscriptions in the billing-v5 branch where subscription_offer_details were always coming back "null" when accessed within Godot. This was preventing me from getting "formatted price strings" etc, for my subscriptions.

The problem I identified is that instances of ArrayList<Dictionary> generated during convertProductDetailsToDictionary() in GooglePlayBillingUtils.java were getting "nulled" as the data was passed to Godot through emit_signal(). I converted all ArrayList<Dictionary> to Object[] before dictionary.put() is called, and it is no longer being nulled. With this fix, you can read subscription_offer_details successfully