Unsolved Check Consumable-InAppPurchase on Android after app reinstall?
-
Hi, originally I wanted to implement a Playstore "Subcription" via the QtPurchase modul with Qt5.12.
Unfortunately its not possible.
https://bugreports.qt.io/browse/QTBUG-49606The proposed hack does not work easily because all the .java files are archived in an exectubale .jar file. This means I must take the originals from
http://code.qt.io/cgit/qt/qtpurchasing.git/tree/src/android/src/org/qtproject/qt5/android/purchasing?h=5.12.1
and replace "inapp" with "subs" and then create the .jar file, but how exactly?So I decided to use "Consumable one-time products" instead. Here I have difficulties with the following usecase.
- User pay the product
- I save the timestamp via QSettings.
Everthing works fine. - Later, he deletes the app and reinstalls it.
- Now the timestamp should be refreshed from Googles local cashed value via getBuyIntent().
https://developer.android.com/google/play/billing/api
Because the Google Play client now caches In-app Billing information locally on the device, you can use the In-app Billing API to query for this information more frequently.
In the QtInAppPurchase.java file
http://code.qt.io/cgit/qt/qtpurchasing.git/tree/src/android/src/org/qtproject/qt5/android/purchasing/QtInAppPurchase.java?h=5.12.1
there is the function createBuyIntentSender() which calls the getBuyIntent(), but the function itself is nowhere called?My question is now how is it possible to recover e.g. the timestamp from an "Consumable one-time products" after the app is reinstalled? Or is there a way to safely save e.g. the timestamp value somewhere outside the save app enviroment?
Thxs... -
@PowerNow I am trying to solve Subscription issues too ... here the thread Auto-Renewable Subscription for iOS/Android.. Gathering whole information in one place right now. About your topic - I would say it's matter of storing it on server side by user_id for example. For it you might use preinstalled DB API of Amason RDS for example if you have no your own server or any other similar services, be careful!!! they are not a cheap solution like they self-adverting . The use-case looks like you getting timestamp on device -> storing it on server -> in case of reinstall requesting timestamp by user_id
Briefly what I got from my own experience of subscription it's develop it through server-side solution and provide uniqueness for user identification. How to do it on device - do not know. If you got solution - could you explain your experience?