Comments (10)
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.
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.
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.
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.
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.
@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.
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.
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.
Oops, will do the pull request without the conflict
from gdx-pay.
Fair enough! Merged :-D
from gdx-pay.
Related Issues (20)
- gdx-pay iOS crashes on iOS < 11.2 HOT 1
- Remove gdx-pay-iosmoe-apple HOT 6
- PurchaseManagerGoogleBilling.purchaseRestore() doesn't return any purchases since v1.0.0 HOT 2
- java.lang.IllegalStateException: Cannot support OfferType Subscription and other types in the same app HOT 4
- PurchaseManager does not support consumables and subscriptions at the same time. HOT 3
- iOS app rejected by the App Store HOT 7
- NPE on start of the app (getTransactionDate() or getTransactionDate().toDate() is null) HOT 3
- Consume item manually HOT 5
- error: cannot find symbol class PurchaseSystem HOT 8
- Pending purchases HOT 4
- Google play billing upgrade ? HOT 21
- v1.3.3 not working with google - PurchaseManagerGoogleBilling.onProductDetailsResponse failed, error code is -2 HOT 3
- Free trial no longer detected on Android
- crash logs seen from Firebase after upgrading the gdx-pay from 1.3.1 to 1.3.4 HOT 5
- SecurityException with gdx-pay on Android HOT 3
- The version of Amazon IAP is quite outdated. HOT 4
- Googlebilling compatibility with Android 14 HOT 1
- gdx-pay-android-googlebilling uses an outdated version of com.android.billingclient HOT 3
- Do I need to implement iOS and Android specific PurchaseManager? HOT 1
- Can I use different PurchaseObserver in one PurchaseManager for different screen?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gdx-pay.