Giter Site home page Giter Site logo

Comments (10)

alex-dorokhov avatar alex-dorokhov commented on May 9, 2024

Oh. I have set querySkuDetails in one of the latest pull requests to true,
because otherwise we did have any prices. But your case is also important.
I guess we should make it with two requests, you are right. The first one
with "false", then call observer methods, then if the first call was
successful, call queryInventory with "true" value.

You can make a pull request with the fix ;)
3 авг. 2015 г. 19:19 пользователь "Berobasket" [email protected]
написал:

It's not possible to offline query inventory (without sku details).
querySkuDetails variable is always set up to true. According to this
comment
http://stackoverflow.com/questions/14231859/how-to-best-save-inapp-purchase-status-locally#comment41999027_15569448
it could be fixed by changing querySkuDetails to false. I know that this
variable cannot always be false, but maybe it could be parametrized earlier.


Reply to this email directly or view it on GitHub
#49.

from gdx-pay.

aberkowski avatar aberkowski commented on May 9, 2024

What do you think about this idea: put querySkuDetails variable into PurchaseManagerConfig and user will decide what he want. User could query inventory without prices (querySkuDetails variable set to false) for the first time and then he could manualy query once again (with changing querySkuDetails in PurchaseManagerConfig to true). I don't need more detailed information about product and I don't know if querying list of products two times (always without user need) will be goog idea.

from gdx-pay.

alex-dorokhov avatar alex-dorokhov commented on May 9, 2024

I'm holidays currently, it's hard to take a look, sorry. But I think in
this case we will break the basic idea of config: setup once. So it will
make the API not so clear for the user.
I would better go for something like PurchaseConfig.autoFetchInfo variable.
It is better to set it to true by default, because it could be not clear
for the user, why there is PurchaseSystem.getInformation method, which is
always return null.
Additionally we could have a method PurchaseSystem.fetchInformation() (or
with other name), which fetches info for all skus.
What does @noblemaster think?
4 авг. 2015 г. 7:51 пользователь "Berobasket" [email protected]
написал:

What do you think about this idea: put querySkuDetails variable into
PurchaseManagerConfig and user will decide what he want. User could query
inventory without prices (querySkuDetails variable set to false) for the
first time and then he could manualy query once again (with changing
querySkuDetails in PurchaseManagerConfig to true). I don't need more
detailed information about product and I don't know if querying list of
products two times (always without user need) will be goog idea.


Reply to this email directly or view it on GitHub
#49 (comment).

from gdx-pay.

noblemaster avatar noblemaster commented on May 9, 2024

I agree with alex-dorokhov to keep it simple.

A) As suggested by alex-dorokhov, we could add a "autoFetchInformation" option to PurchaseManagerConfig. In that sense we would fetch all the information during install for people that prefer that. I would not add a fetchInformation() method though. Having it in install(...) seems the more straightforward solution!?

B) Depending on the platform, it might be a lot of information to fetch? It's not just Android, but also includes iOS, Desktop markets, you name it. As far as I know no images are currently fetched. But some stores might add that in the future. In order to reduce memory consumption we could modify the getInformation(identifier) method and instead use a callback such as:
void getInformation(Callback<Information> information, String identifier).
In that sense we deprecate the current getInformation(identifier) method and instruct everyone to use the new method with callback.

Comments? Other ideas/suggestions?

from gdx-pay.

aberkowski avatar aberkowski commented on May 9, 2024

You're right. @noblemaster could you add this in the near future? For me more important is to first fetch inventory with querySkuDetails set to false (method getInformation() could be changed later).

from gdx-pay.

alex-dorokhov avatar alex-dorokhov commented on May 9, 2024

@noblemaster sounds good to me.
I also had in mind the idea from point B.
4 авг. 2015 г. 9:10 пользователь "Christoph Aschwanden" <
[email protected]> написал:

I agree with alex-dorokhov to keep it simple.

A) As suggested by alex-dorokhov, we could add a "autoFetchInformation"
option to PurchaseManagerConfig. In that sense we would fetch all the
information during install for people that prefer that. I would not add a
fetchInformation() method though. Having it in install(...) seems the more
straightforward solution!?

B) Depending on the platform, it might be a lot of information to fetch?
It's not just Android, but also includes iOS, Desktop markets, you name it.
As far as I know no images are currently fetched. But some stores might add
that in the future. In order to reduce memory consumption we could modify
the getInformation(identifier) method and instead use a callback such as:
void getInformation(Callback information, String identifier).
In that sense we deprecate the current getInformation(identifier) method
and instruct everyone to use the new method with callback.

Comments? Other ideas/suggestions?


Reply to this email directly or view it on GitHub
#49 (comment).

from gdx-pay.

noblemaster avatar noblemaster commented on May 9, 2024

OK, going with point B (using a callback for getInformation(...)) and not querying the SKU-details during install(...) makes the most sense.

Also, I don't use the getInformation. I would definitely be in favor of not querying the SKU-details during install as well! Would someone mind submitting a pull request? Sorry, I am little bit busy at the moment to implement this myself.

from gdx-pay.

alex-dorokhov avatar alex-dorokhov commented on May 9, 2024

Sorry, I have thought more and tried to go with option B, but it requires to many changes and also complexifies the usage of the library. It was much easier to go with option A.
I would suggest to do not overcomplicated getInformation method without real need.

from gdx-pay.

alex-dorokhov avatar alex-dorokhov commented on May 9, 2024

Oops, will do the pull request without the conflict

from gdx-pay.

noblemaster avatar noblemaster commented on May 9, 2024

Fair enough! Merged :-D

from gdx-pay.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.