Giter Site home page Giter Site logo

msoftware / donations Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sufficientlysecure/donations

0.0 2.0 0.0 1.43 MB

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

License: Apache License 2.0

Java 100.00%

donations's Introduction

Android Donations Lib

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

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!

How to import

Add this to your build.gradle:

repositories {
    jcenter()
}

dependencies {
    compile 'org.sufficientlysecure:donations:2.5'
}

Screenshots

Product Flavor: Google Product Flavor: Fdroid
Screenshot Screenshot

Translations

Help translating on Transifex.

Build Example App with Gradle

  1. Have Android SDK "tools", "platform-tools", and "build-tools" directories in your PATH (http://developer.android.com/sdk/index.html)
  2. Export ANDROID_HOME pointing to your Android SDK
  3. Download Android Support Repository, and Google Repository using Android SDK Manager
  4. Execute ./gradlew build

Add the lib to your project

  • The ExampleApp depends on "libraries/Donations" and has two product flavors defined in its gradle configuration.
  • See ExampleApp/build.gradle how to build different product flavors. The build script adds DONATIONS_GOOGLE to the auto generated BuildConfig.java.
  • See DonationsActivity.java how to instantiate the Fragment based on DONATIONS_GOOGLE.
  • 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
  • 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

Changelog

2.5

  • Sync translations

2.4

  • Fix NPE without billing service

2.3

  • Publish to JCenter

2.2

  • Updated build files
  • Added bitcoin support (thanks to Oleg Vaskevich)

2.1

  • Permissions are now defined per product flavor, they were removed from library's AndroidManifest

2.0

  • Now uses Gradle Build System (http://tools.android.com/tech-docs/new-build-system)
  • No xml configuration needed anymore!
  • Fragment can be instantiated and used in any Activity.
  • 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.

donations's People

Contributors

swoker avatar allanwang avatar btimofeev avatar demantz avatar dschuermann avatar friedger avatar ianhanniballake avatar badnetmask avatar oleg-codaio avatar

Watchers

Michael jentsch avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.