Set Offer Token using Flutter in app purchase package for Google Play Store - flutter

I am trying to offer a subscription with a specified offer for specific users using Flutter in app purchases in the Google Play console.
I created an offer in Google Play Store with the "Eligibility Criteria" set to "Developer Determined", but I cannot figure out how to specify this offer in an in app purchase.
I am looking for something similar to the setOfferToken method provided by the Google Play Billing Library.
I thought that I could use the offer ID as a product ID from the Google developer API docs, but I had misunderstood the documentation.
I have looked through the Flutter in app purchase package and the Google Play Billing Library, but could not find documentation related to my use case.
Is there any documentation specific to Flutter for assigning offer IDs to in app subscription purchases?
Thanks!

Related

HMS : alternative for CampaignTrackingReceiver of Google analytics in Huawei DTM Kit

Is there any alternative for CampaignTrackingReceiver of Google analytics in Huawei DTM Kit?
Currently, I'm following below link of Google analytics :
https://developers.google.com/android/reference/com/google/android/gms/analytics/CampaignTrackingReceiver
Also unable to find any Huawei Kits for replacement of "fireBase-appindexing:19.1.0", Can anyone suggest some useful information or any document link.
I'm following below link of Google analytics : https://developers.google.com/android/reference/com/google/android/gms/analytics/CampaignTrackingReceiver
DTM don't has similar class, for this question, you don't need to config Receiver in AndroidManifest.xml. Huawei Analytics SDK will auto-collect information of install_referre when user open app for the first time. We don't have similar class in Huawei analytics too. Reference Docs.
Also unable to find any Huawei Kits for replacement of "fireBase-appindexing:19.1.0"
For app index, you can use app linking. Even google also recommends app linking instead of app indexing, so you could try using Huawei App Linking.
If you intend to use the tag template-based visual event tracking feature of DTM Web to report events in your website to Google Analytics. Here are some info. and one example for your reference:
https://forums.developer.huawei.com/forumPortal/en/topic/0202575663223170066?fid=0101187876626530001
https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/web-visual-event-tag-ha-0000001151584240
https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/tracing-point-development-0000001078556280
As for app index, you can refer to Huawei app linking :
Developer Guide: https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-applinking-introduction-0000001054143215
Codelabs: https://developer.huawei.com/consumer/en/codelabsPortal/searchdetail?searchKeyword=App%20Linking
Manually Constructing a Link of App Linking: https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-applinking-createlinks-defined-0000001055514692

How to handle Google play Redeem Promo code in Flutter?

I'm developing a free Flutter app (Android and iOS), that offers premium content (in-app subscription) using official Flutter in-app-purchase plugin - latest version 2.0.1.
We'd like to use Google Play Promo codes to give premium content for free (with no extra charges) to some users.
What I've tried so far:
Promo codes for SUBSCRIPTION: They only give a longer free trial (and charge user afterwards if they don't cancel). The Promo codes worked fine but this is not really suitable for us because it can charge users.
Promo codes for PRODUCT: A friend suggested to create an in-app Product that unlocks premium content and promo code would give this product for free. I've generated promo codes for it and started testing it through Internal testing. The Google Play documentation says it's possible to Redeem the code from A) Google Play or B) from your app.
Problems with both options:
A) Google play: When we Redeem the code from Google Play, the code is accepted and message is displayed saying the product was applied. However:
we don't get any purchase notification in our backend system (there was no received message in play_billing Pub sub topic where we usually receive purchase notifications from Google Play).
The purchase is also not visible in Google Play Developer Console > Orders.
When we try to buy the product from the app (for same Google account) we get Google in-app purchase dialog with Error: You already own this item. We tried clearing Google play app's cache and data but that didn't help.
there is no method in Flutter in-app-purchase plugin that we can use to query if user has already purchased the product (and just unlock the premium content then)
B) From the app: I don't think this is supported by official Flutter in-app-purchase plugin. The plugin documentation only mentions Apple store Promo codes. Also when we press the button to buy the product the Google in-app purchase dialog doesn't contain any option to use Promo code. And no, I didn't use Licence testing (test card) but my real private credit card.
I feel so stuck!!! Any help is much appreciated! I need to start a promotion campaign next week to get as many user feedback as possible (to apply for funding).
-------UPDATE-----------------------
Thanks to another developer we were able to identify the reason why "Redeem code" option didn't appear in the billing dialog.
B) From the app: The Redeem code option in the billing bottom-sheet dialog appears only
when in production mode
for new users (it's not visible if the user applied the one-time code before or if the user is a tester user)

Asking AppTrackingTransparency permission for using google analytics , is mandatory?

I am using Google Analytics SDK in my application.
It uses the demographic area, age and other user informations.
So, Am I need to ask permission for AppTracking manually or it was handled in google analytics SDK?
Without AppTracking Permission,Will my future updates get approved by iTunes connect?
YES, I need to ask permission for App Tracking Transparency manually. It will not handled by Google Analytics SDK.
Since I am using Google Analytics for campaning tracking, GASDK gets the device IDFA, So the app must need Tracking Permission.
Note: If you or your third party framework uses IDFA, It is mandatory to implement app tracking transparency framework. Otherwise Apple will simply reject us.!

List all the in-app products for an Apple Store app

Developing subscriptions back-end service for App-Store app, there is a requirement to fetch all available in-app products and subscription for specific App-Store App. The best way is using the rest API call.
I wondering if the App-Store exposes such API. What I expect to have is something similar to what Android provides.
https://developers.google.com/android-publisher/api-ref/inappproducts/list
The Rest API.
GET https://www.googleapis.com/androidpublisher/v3/applications/packageName/inappproducts
Googling it, didn't bring anything close to what Android has.
Any helpful ideas or develop stuff will be appreciated.
I believe you are looking for :
GET https://api.appstoreconnect.apple.com/v1/apps/{id}/inAppPurchasesV2
From documentation: https://developer.apple.com/documentation/appstoreconnectapi

Do I need to add products to Google Play Developer Console for Ionic In App Purchase

I am developing an application using ionic3 and the app is about selling books. I created web application for the client so they can add book to the platform. Now I am considering In App Purchase as a means of payment on the mobile app but all the tutorial I have seen requires that I add the products to google developer console and Itunes. My question is Do I really need to add products to Google Play Developer Console for Ionic In App Purchase? Cos my Idea is just to request for the products available in the database and use inApp Purchase basically as a payment gateway
You have to setup product offers in each platform.
The main reason is because Apple and Google performs purchase operation relying on the data stored on their side (app store connect or console), where price tier is fixed etc.
If the platforms would allow a developer server send arbitrary requests it would be super hard to manage for apple/google hence they prefer having products for sale defined on their end.
Client just mirrors data, but source of truth for offers is always Apple or Google side system.