Android In-App Purchases

WARNINGS:

  • The purchases you make when running this APK on Android are real and will cost you money. If you do not want to actually pay for them, you need to have your Google account added as a beta tester in the Play console.
  • This is not a "Krita Debug" APK, it will clobber the regular Krita installation. This is necessary because in-app purchases for the "org.krita" application are not available for the "org.krita.debug" application.
  • You cannot un-purchase the one-time purchase bundle or instantly end your subscription yourself. This is only possible by issuing a refund through the Play Console. Test things in the correct order.

This adds in-app purchases to the Android version of Krita. There's a one-time purchase and a subscription. Both currently let you download brush bundles in return. On degoogled devices or on debug/plus/next versions of Krita, you get donation options instead.

The splash screen has become an Android UI element to let you browse supporter options during startup. The welcome widget has a random banner at the bottom. After purchasing something, those support prompts go away.

Supporter bundles are created in this repository: hartenfels/krita-supporter-bundles!1

Here's a video showing me walking through everything I could think of: https://drive.proton.me/urls/8JGABY12K0#hdy3K5GwNjZC

Test Plan

  • Read the warnings at the top before proceeding.
  • Verify that none of this stuff is on platforms other than Android.
  • Look at the splash screen. Observe that it's in the Android UI and that it lets you purchase stuff after the first startup if you didn't purchase anything else.
  • Look at the banner at the bottom of the welcome widget. Click on it, observe it takes you to the purchase options.
  • Look through the new options under Settings: "Get More Resources", "Manage Supporter Bundles", "Manage Subscriptions".
  • Purchase something. Observe that the bottom of the welcome widget turns into a thanks message and a button and that the splash screen no longer shows the support button.
  • Download resource bundles. Observe that that works.
  • On a degoogled device, observe that you just get donation options.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
  • Does the patch add a user-visible feature? If yes, is there a documentation MR ready for it at Krita Documentation Repository?
    • Make a documentation MR once this is ready.

Reminder: the reviewer is responsible for merging the patch, this is to ensure at the least two people can build the patch. In case a patch breaks the build, both the author and the reviewer should be contacted to fix the build. If this is not possible, the commits shall be reverted, and a notification with the reasoning and any relevant logs shall be sent to the mailing list, kimageshop@kde.org.

Edited by Carsten Hartenfels

Merge request reports

Loading