pwa-play-billing
pwa-play-billing copied to clipboard
No support for any development environment
I am presently working with a PWA, and have to incorporate the Google Play Billing API so subscriptions can be purchased.
There doesn't appear to be any way to develop the javascript in a local development environment like Visual Studio. It seems the APIs just flat out don't run, unless you deploy the code on a properly packaged app released through Google Play. Even creating internal test releases is at least a 20 minute routine (compile PWA, deploy to web space, use PWABuilder to create package, extract aab file and upload to Google Play console to create new release, download to phone/device, clear cache, run...)
Most developers (myself included) develop code incrementally, we start simple, run the code, if it works, embellish and add next task, otherwise fix and try again, Even Google's own youtube videos on using this API develop in this way! This is what development environments are for. There are very few developers who can read API docs, look at sample code, then knock out 40 lines of javascript that works first time.
Is there really no way to get the APIs to work in a dev environment? I totally understand why these APIs for production purposes are only available in properly trusted apps, but there has to be some kind of sandbox or dummy option to help developers, even if it is only using fixed test data and demo payments. Nobody can pose any security threat using sandbox demo APIs and it would hugely reduce the time required to get working code.
Because a 20 minute round trip each time I want to make a change to the javascript during development is just not a practical or viable way to work.
Can this sample code even run without being incorporated and deployed to an actual release app?
Hi there,
You can enable the following Chrome flag which removes the restriction that the TWA has to be installed from the Play Store. chrome://flags/#enable-debug-for-store-billing
If your APK or AAB is already in the Play Store, you don't have to republish your app when you change your website code. TWAs don't ship Javascript code in the app package - this is fetched from your server when the app starts. So you can simply restart the app when you make an update in your Javascript code. To make sure you receive the newest code, clear or disable the cache in DevTools.
Hope this helps. -ibo
On Fri, Sep 22, 2023 at 4:33 AM cactusoft @.***> wrote:
I am presently working with a PWA, and have to incorporate the Google Play Billing API so subscriptions can be purchased.
There doesn't appear to be any way to develop the javascript in a local development environment like Visual Studio. It seems the APIs just flat out don't run, unless you deploy the code on a properly packaged app released through Google Play. Even creating internal test releases is at least a 20 minute routine (compile PWA, deploy to web space, use PWABuilder to create package, extract aab file and upload to Google Play console to create new release, download to phone/device, clear cache, run...)
Most developers (myself included) develop code incrementally, we start simple, run the code, if it works, embellish and add next task, otherwise fix and try again, Even Google's own youtube videos on using this API develop in this way! This is what development environments are for. There are very few developers who can read API docs, look at sample code, then knock out 40 lines of javascript that works first time.
Is there really no way to get the APIs to work in a dev environment? I totally understand why these APIs for production purposes are only available in properly trusted apps, but there has to be some kind of sandbox or dummy option to help developers, even if it is only using fixed test data and demo payments. Nobody can pose any security threat using sandbox demo APIs and it would hugely reduce the time required to get working code.
Because a 20 minute round trip each time I want to make a change to the javascript during development is just not a practical or viable way to work.
Can this sample code even run without being incorporated and deployed to an actual release app?
— Reply to this email directly, view it on GitHub https://github.com/chromeos/pwa-play-billing/issues/93, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANNGTAIDAUVRUXH2XF5DYDX3VEMHANCNFSM6AAAAAA5CX3FHQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>