Piano SDK for Android
Java
Switch branches/tags
Clone or download
Latest commit 4dc4c80 Jul 19, 2018
Permalink
Failed to load latest commit information.
api 1.1.0 Jul 19, 2018
composer-show-template 1.0.4 Jul 4, 2018
composer 1.1.0 Jul 19, 2018
gradle/wrapper 1.1.0 Jul 19, 2018
oauth 1.1.0 Jul 19, 2018
sample 1.1.0 Jul 19, 2018
.gitignore Initial Commit Jun 2, 2016
LICENSE Initial Commit Jun 2, 2016
README.md 1.1.0 Jul 19, 2018
build.gradle 1.1.0 Jul 19, 2018
gradle.properties 1.1.0 Jul 19, 2018
gradlew 1.0.2 Sep 20, 2017
gradlew.bat 1.0.0 Apr 10, 2017
settings.gradle 1.0.0 Apr 10, 2017

README.md

Piano SDK for Android

Welcome to Piano SDK for Android.

Getting started

This document details the process of integrating the Piano SDK with your Android application. If you have any questions, don't hesitate to email us at support@piano.io.

Download the Piano SDK

Gradle

The Piano SDK is available as an AAR via jCenter. To add the api, composer, composer-show-template, oauth, etc. dependencies, open your project’s build.gradle and update the repositories and dependencies blocks as follows:

repositories {
    // ... other project repositories
    jcenter()
}

// ...

dependencies {
    // ... other project dependencies

    compile 'io.piano.android:api:1.1.0'

    compile 'io.piano.android:composer:1.1.0'

    compile 'io.piano.android:composer-show-template:1.1.0'

    compile 'io.piano.android:oauth:1.1.0'
}

Usage

API

Initialize PianoClient in your Application's onCreate method:

@Override
public void onCreate() {
    super.onCreate();

    pianoClient = new PianoClient(this, BuildConfig.PIANO_AID, BuildConfig.DEBUG);
}

You can configure BuildConfig.PIANO_AID in build.gradle:

defaultConfig {
    applicationId "io.piano.android.sample"
    // ... other project properties

    buildConfigField "String", "PIANO_AID", "\"$aid\""
}

PianoClient provides underlying methods to APIs. They can be accessed as follows:

PianoClient pianoClient = ((PianoSampleApplication) getApplication()).getPianoClient();
List<Access> list = pianoClient.getUserAccessApi().list(pianoClient.getAid());

Composer

Take a look at ComposerActivity

Sample

We created a sample app to showcase our SDK and highlight some of the features provided by each API.

Don't forget to specify io.piano.aid=$YOUR_AID in piano.properties in sample before you start importing!

License

Copyright 2016 Piano, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.