Skip to content

Donations Library for Android. Supports Google Play Store, PayPal, and Flattr

License

Notifications You must be signed in to change notification settings

mimminito/android-donations-lib

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Android Donations Lib

Android Donations Lib supports donations by Google Play Store, PayPal, and Flattr.

It is used in my projects AdAway, FasterGPS, and NTP-Sync.

Contribute

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

Screenshot

Screenshot

Add the lib to your project

  • New -> Android Project -> Create project from existing source, choose org_donations
  • Add org_donations as Android Lib (Properties of your project -> Android -> Library -> add org_donations as android library)
  • Add the following lines to your AndroidManifest for permissions:
<uses-permission android:name="android.permission.INTERNET" />
<!-- Required permission to use Google Play Store donations -->
<uses-permission android:name="com.android.vending.BILLING" />
  • Add the following lines to your AndroidManifest the activity:
<activity
    android:name="org.donations.DonationsActivity"
    android:excludeFromRecents="true"
    android:label="Donations"
    android:launchMode="singleTask"
    android:theme="@android:style/Theme.DeviceDefault.Dialog" />

<!-- - Google Play Store donations -->
<service android:name="org.donations.google.BillingService" />

<receiver android:name="org.donations.google.BillingReceiver" >
    <intent-filter>
        <action android:name="com.android.vending.billing.IN_APP_NOTIFY" />
        <action android:name="com.android.vending.billing.RESPONSE_CODE" />
        <action android:name="com.android.vending.billing.PURCHASE_STATE_CHANGED" />
    </intent-filter>
</receiver>
  • Copy the file donations__config.xml to res/values/ of your own project
  • Configure the Donations Lib by altering donations__config.xml
  • Integrate this activity in your app by opening it as an intent:
startActivity(new Intent(this, DonationsActivity.class));
  • When publishing the app you have to create in-app products for your app in the Google Play Store that matches the ones you defined in donations__config.xml

About

Donations Library for Android. Supports Google Play Store, PayPal, and Flattr

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published