11-07-2012 03:00 AM
Hello,
I didn't found in documentation how often I can call Payment Manager (Cascades, BB10) for detection of purchased digital goods.
I'm doing it everytime app starts hoping that it is somewhere cached but not sure whether it is good idea.
Can anybody from BB suggest what is best practice?
Tom
Solved! Go to Solution.
11-07-2012 07:45 AM
11-07-2012 08:13 AM
There are signs of caching in the documentation.
See parameter forceServerRefresh at https://developer.blackberry.com/cascades/referenc
I want to avoid caching on my side if Blackberry Platform already does it.
This is the reason why I'm asking here and hoping to get ultimate response from Blackberry.
11-07-2012 09:12 AM
Hi there,
The App World cache should be thought of in the same way as a browser's cache, data will get cached but could be cleared out at any time if desired by the app (in this case App World).
The recommended approach would be to first try to retrieve purchases from the cache, if these do not exist then you could refresh from the App World Server.
Another good idea would be to store these purchases yourself rather than relying on App World at all. This will save you from having to check for existing purchases over the network every time the app is launched.
11-07-2012 09:22 AM
Thanks for reply gbeukeboom
Not much happy with this answer as it means that thousands developers have to implement their own caching instead of having it in one place (= in appworld). So there will be exactly the same issues with license verification as on Android are.
Tom
P.S. I would really appreciate if this is written in documentation for Payment Manager.
11-07-2012 09:31 AM
Hi Tom,
Developers don't "need" to implement storing the digital goods themselves, all data can be retrieved from App World either using the cache or network and actually a network refresh of App World should always be done at least once in the application lifecycle to account for a few scenarios.
The App World cache should be a good place to check for this data, but it cannot be guaranteed to be there all of the time.