Skip to content
Dashbud

Use Donations

Donations let your users support you with in-app purchases, from inside your app. This is optional.

In the Google Play Console, create one in-app product for each donation option, for example a small, a medium and a large donation. Write down each Product ID.

Tip

New to in-app products?

See Create an in-app product.

Billing is on in the sample. Check these two things:

  • In MainActivity.kt, billingEnabled is true:

    override val billingEnabled = true
  • In app/src/main/AndroidManifest.xml, this line is there and isn’t commented out:

    <uses-permission android:name="com.android.vending.BILLING" />

Donations need your app’s license key, even if you don’t use the license checker. See Change Security Settings.

Open app/src/main/res/values/dashboard_setup.xml and add each Product ID as an item:

<string-array name="donation_items">
<item>small_donation</item>
<item>medium_donation</item>
<item>large_donation</item>
</string-array>

The IDs must match the ones in the Play Console exactly.

Note

In-app purchases only work for builds installed from Google Play. Upload your app to a testing track (internal testing is the quickest) to try them.

  1. Set billingEnabled to false in MainActivity.kt.
  2. Delete the BILLING permission line from AndroidManifest.xml.
  3. Leave donation_items empty.

Made by Jahir Fiquitiva. Questions? Ask in the Discord server.