跳到內容
  • 版面
  • 最新
  • 標籤
  • 熱門
  • 使用者
  • 群組
  • 搜尋
  • Get Qt Extensions
  • Unsolved
Collapse
品牌標誌
  1. 首頁
  2. Qt Development
  3. Mobile and Embedded
  4. Qt Purchasing supports Subscriptions on Android?
Forum Updated to NodeBB v4.3 + New Features

Qt Purchasing supports Subscriptions on Android?

已排程 已置頂 已鎖定 已移動 Solved Mobile and Embedded
22 貼文 8 Posters 5.3k 瀏覽 2 Watching
  • 從舊到新
  • 從新到舊
  • 最多點贊
回覆
  • 在新貼文中回覆
登入後回覆
此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
  • M 離線
    M 離線
    morte
    寫於 最後由 編輯
    #7

    Suggestion about Subscriptions https://bugreports.qt.io/browse/QTBUG-49606 opened 3 years ago and still not implemented, im wondering why this important thing which looks like don't need much effort to implement still not fixed

    1 條回覆 最後回覆
    0
    • SGaistS 離線
      SGaistS 離線
      SGaist
      Lifetime Qt Champion
      寫於 最後由 編輯
      #8

      @morte Because there are so many people working on Qt and tasks have to be prioritise. All the things that "looks like not much effort" still needs proper implementation, tests, etc. So it's rarely that "not much effort" regarding such a feature. However, contributions are always welcome and help get features faster in.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 條回覆 最後回覆
      2
      • H hjpriester1967

        I believe the blog describes the source as it was in 2013. It it slightly changed now in Qt 5.9.7. (that was the version I was looking at).

        The problem is in the Qt Java code there is a call: getSkuDetails where there the 3th parameter is always 'inapp'. this parameter needs to be 'subs' for subscription.
        So if you have need to support for subscription ONLY is it easy to hack....if you need to support both you need to do much more. At API level you have to pass the type and modify c++ and java code.

        In my hack: If a product does not exist as an normal 'inapp' type I check if it exist as a 'subs' type and the this type is stored (internally). when doing a purchase I pass the type.

        PowerNowP 離線
        PowerNowP 離線
        PowerNow
        寫於 最後由 PowerNow 編輯
        #9

        @hjpriester1967: I just did the "static test" with the product-id "android.test.purchased" from google billing and it worked fine. Now I tried it with my own product-id from a subscription and I got the message "...unregistered product". So I wanted to modify the QtInAppPurchase.java file and replace "inapp" with "subs" because I only need subscriptions. But this file does not exist in the Qt5.12 folder. I also greped for "getSkuDetails". Now it seems so that this file is archived under the executable root\android_armv7\jar\QtPurchasing.jar. Is there a way to change such files or an other easier way? Thxs...

        H 1 條回覆 最後回覆
        0
        • SGaistS 離線
          SGaistS 離線
          SGaist
          Lifetime Qt Champion
          寫於 最後由 編輯
          #10

          You need to grab the QtPurchasing module sources to get that file.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          PowerNowP 1 條回覆 最後回覆
          0
          • SGaistS SGaist

            You need to grab the QtPurchasing module sources to get that file.

            PowerNowP 離線
            PowerNowP 離線
            PowerNow
            寫於 最後由 PowerNow 編輯
            #11

            @SGaist: Thxs, but what do you exactly mean with grab? As I know now .jar can't be changed. So the "easiest" way would be to modify QTInAppPurchasing.java from the original modul

            http://code.qt.io/cgit/qt/qtpurchasing.git/tree/src/android/src

            and create a new .jar file. But I have no experience creating executable .jar files.

            1 條回覆 最後回覆
            0
            • SGaistS 離線
              SGaistS 離線
              SGaist
              Lifetime Qt Champion
              寫於 最後由 編輯
              #12

              Looks like you would have to build the module.

              You can open it in Qt Creator and build it from there. Then copy the resulting .jar file in your official Qt installation (don't forget to make a backup of the original file just in case).

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              PowerNowP 1 條回覆 最後回覆
              0
              • PowerNowP PowerNow

                @hjpriester1967: I just did the "static test" with the product-id "android.test.purchased" from google billing and it worked fine. Now I tried it with my own product-id from a subscription and I got the message "...unregistered product". So I wanted to modify the QtInAppPurchase.java file and replace "inapp" with "subs" because I only need subscriptions. But this file does not exist in the Qt5.12 folder. I also greped for "getSkuDetails". Now it seems so that this file is archived under the executable root\android_armv7\jar\QtPurchasing.jar. Is there a way to change such files or an other easier way? Thxs...

                H 離線
                H 離線
                hjpriester1967
                寫於 最後由 編輯
                #13

                @PowerNow I have only looked at Qt 5.9 for the subscription and not at Qt 5.12. My boss decided to put using subscription on Android on hold in the apps for now so I am not using it anymore at the moment.

                PowerNowP 1 條回覆 最後回覆
                0
                • H hjpriester1967

                  @PowerNow I have only looked at Qt 5.9 for the subscription and not at Qt 5.12. My boss decided to put using subscription on Android on hold in the apps for now so I am not using it anymore at the moment.

                  PowerNowP 離線
                  PowerNowP 離線
                  PowerNow
                  寫於 最後由 編輯
                  #14

                  @hjpriester1967 Was it also necessary to create a .jar file at Qt5.9?

                  1 條回覆 最後回覆
                  0
                  • SGaistS SGaist

                    Looks like you would have to build the module.

                    You can open it in Qt Creator and build it from there. Then copy the resulting .jar file in your official Qt installation (don't forget to make a backup of the original file just in case).

                    PowerNowP 離線
                    PowerNowP 離線
                    PowerNow
                    寫於 最後由 編輯
                    #15

                    @SGaist: This sounds good.

                    1. How can I completely (incl. the subdir structur) load the QtPurchase modul into Qt Creator?
                      http://code.qt.io/cgit/qt/qtpurchasing.git/tree/src/android/src?h=5.9
                    2. Then, how create a .jar file?
                      Thxs...
                    1 條回覆 最後回覆
                    0
                    • H 離線
                      H 離線
                      hjpriester1967
                      寫於 最後由 編輯
                      #16

                      @Powernow: I always use Qt source tar and compile Qt my self. I see you use the precompiled version. The qtpurchasing is subdirectory and the java files are in that tree. The jar files are creating during the make...and after make install these are in the jar subdirectory of the qt installation tree.

                      PowerNowP 1 條回覆 最後回覆
                      0
                      • H hjpriester1967

                        @Powernow: I always use Qt source tar and compile Qt my self. I see you use the precompiled version. The qtpurchasing is subdirectory and the java files are in that tree. The jar files are creating during the make...and after make install these are in the jar subdirectory of the qt installation tree.

                        PowerNowP 離線
                        PowerNowP 離線
                        PowerNow
                        寫於 最後由 編輯
                        #17

                        @hjpriester1967 So maybe I will also try to compile Qt myself. Thxs...

                        Another question, as you are using subsriptions.

                        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.

                        If someone unstall/install the app. Do you check e.g. the timestamp from the subscription via the Googles local cashed with getBuyIntent()?

                        https://forum.qt.io/topic/100193/check-consumable-inapppurchase-on-android-after-app-reinstall

                        1 條回覆 最後回覆
                        0
                        • SGaistS 離線
                          SGaistS 離線
                          SGaist
                          Lifetime Qt Champion
                          寫於 最後由 編輯
                          #18

                          No need for a complete Qt build. Just the module you are interested in.

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 條回覆 最後回覆
                          0
                          • H 離線
                            H 離線
                            h00bs
                            寫於 最後由 h00bs 編輯
                            #19

                            There is a Qt plugin for in-app purchase subscriptions on iOS and Android available with Felgo: https://felgo.com/updates/release-3-2-0-qt-5-12-3-subscriptions

                            Developer at Felgo - https://felgo.com/qt

                            Develop mobile Apps for iOS & Android with Qt
                            Develop Games with Qt

                            Felgo is an official Qt Technology Partner

                            1 條回覆 最後回覆
                            0
                            • G 離線
                              G 離線
                              Gourmet
                              寫於 最後由 Gourmet 編輯
                              #20

                              up

                              Any news about this issue? I strongly need in-app subscription for my new Qt5 based Android app. Is there straight and well documented way to implement this?

                              mrjjM 1 條回覆 最後回覆
                              0
                              • G Gourmet

                                up

                                Any news about this issue? I strongly need in-app subscription for my new Qt5 based Android app. Is there straight and well documented way to implement this?

                                mrjjM 離線
                                mrjjM 離線
                                mrjj
                                Lifetime Qt Champion
                                寫於 最後由 編輯
                                #21

                                @Gourmet
                                Hi
                                It seems the path was canceled "Harald Meyer Abandoned" so I don't think
                                its included or planned for any new releases.

                                G 1 條回覆 最後回覆
                                0
                                • mrjjM mrjj

                                  @Gourmet
                                  Hi
                                  It seems the path was canceled "Harald Meyer Abandoned" so I don't think
                                  its included or planned for any new releases.

                                  G 離線
                                  G 離線
                                  Gourmet
                                  寫於 最後由 編輯
                                  #22

                                  @mrjj but something changed today and yesterday in QTBUG-49606...

                                  1 條回覆 最後回覆
                                  1

                                  • 登入

                                  • Login or register to search.
                                  • 第一個貼文
                                    最後的貼文
                                  0
                                  • 版面
                                  • 最新
                                  • 標籤
                                  • 熱門
                                  • 使用者
                                  • 群組
                                  • 搜尋
                                  • Get Qt Extensions
                                  • Unsolved