README.md

Android Donations Lib

It is used in projects, such as OpenKeychain, AdAway, FasterGPS, and NTPSync.

NOTE: Google mailed me to remove PayPal donation capability when publishing on Google Play! Thus, you should build "product flavors" defined by the example: One version with Google Play donation capability and one with Paypal, Flattr, and Bitcoin!

Don't forget to pass through results in onActivityResult() back to the fragment as shown in DonationsActivity.java.

When publishing the app you must create managed in-app products for your app in the Google Play Store that matches the ones you defined in private static final String[] GOOGLE_CATALOG

Build flavors

Keep in mind that Google forbits other payment methods besides Google Play. Thus, in the example, two build flavors are used. Check out ExampleApp/build.gradle. The build script adds DONATIONS_GOOGLE to the auto generated BuildConfig.java.

Add <uses-permission android:name="android.permission.INTERNET" /> to product flavors that use Flattr

Add <uses-permission android:name="com.android.vending.BILLING" /> to product flavors that use Google Play In-app billing

2.0

You can build "product flavors" defined by the ExampleApp: One version with Google Play Donation capability and one with Paypal and Flattr! (Google mailed me to remove PayPal donation capability when publishing on Google Play!)

Contribute

Fork Android Donations Lib and do a pull request. I will merge your changes back into the main project.