Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Check Consumable-InAppPurchase on Android after app reinstall?

Check Consumable-InAppPurchase on Android after app reinstall?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 513 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • PowerNowP Offline
    PowerNowP Offline
    PowerNow
    wrote on last edited by PowerNow
    #1

    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-49606

    The 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.

    1. User pay the product
    2. I save the timestamp via QSettings.
      Everthing works fine.
    3. Later, he deletes the app and reinstalls it.
    4. 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...

    B 1 Reply Last reply
    0
    • PowerNowP PowerNow

      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-49606

      The 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.

      1. User pay the product
      2. I save the timestamp via QSettings.
        Everthing works fine.
      3. Later, he deletes the app and reinstalls it.
      4. 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...

      B Offline
      B Offline
      bogong
      wrote on last edited by bogong
      #2

      @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?

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved