How to use flattr4j on Android devices

For running flattr4j v2 on Android, at least Android 3.0 “Honeycomb” is needed. Lower API levels do not work because the Flattr server makes use of SNI. I recommend to use at least flattr4j v2.13, especially if you run into HTTPS certificate issues.


The flattr4j core API can be used without restrictions on Android, including FlattrService and FlattrAuthenticator.


flattr4j depends on the reference library. However, it is already provided by Android and does not need to be installed separately.

Since flattr4j connects to the Flattr API via HTTP, your application needs INTERNET permission to run.


Make sure that json is excluded when you use build tools with dependency management.

If you are using Gradle for Android development (e.g. Android Studio), add this dependency to your build.gradle file:

dependencies {
    compile('org.shredzone.flattr4j:flattr4j-core:2.14') {
        exclude module: 'json'