Giter VIP home page Giter VIP logo

amplify-android's Introduction

Amplify for Android (Preview)

AWS Amplify

AWS Amplify provides a declarative and easy-to-use interface across different categories of cloud operations. AWS Amplify goes well with any Android based frontend workflow for mobile developers.

Our default implementation works with Amazon Web Services (AWS), but AWS Amplify is designed to be open and pluggable for any custom backend or service.

Features/APIs

*Note: Amplify docs are still being updated and will go live by EOW. The below links will take you to the SDK documentation currently.

  • Analytics: Easily collect analytics data for your app. Analytics data includes user sessions and other custom events that you want to track in your app.
  • API: Provides a simple solution when making HTTP requests. It provides an automatic, lightweight signing process which complies with AWS Signature Version 4.
  • DataStore: Provides a persistent on-device storage repository for you to write, read, and observe changes to data if you are online or offline, and seamlessly sync to the cloud as well as across devices.
  • GraphQL Client: Interact with your GraphQL server or AWS AppSync API with an easy-to-use & configured GraphQL client.
  • Storage: Provides a simple mechanism for managing user content for your app in public, protected or private storage buckets.

All services and features not listed above are supported via the Escape Hatch with the AWS Android SDK like below:

AmazonS3Client s3Client = Amplify.Storage.getEscapeHatch();
List<Bucket> buckets = s3Client.listBuckets();

Platform Support

Amplify SDK supports Android API level 15 (Android 4.0.3) and above.

Installation

Using Gradle

Gradle can be used alongside Android Studio to declare dependencies on Amplify right out of the box via Maven central repository. To use Amplify, simply specify the module dependencies inside app's build.gradle dependencies section.

dependencies {
    // Core SDK is required for configuring Amplify
    implementation 'com.amplifyframework:core:0.9.1'
    
    // Specify only the modules that the app will use
    implementation 'com.amplifyframework:aws-datastore:0.9.1'
    implementation 'com.amplifyframework:aws-api:0.9.1'
    implementation 'com.amplifyframework:aws-storage-s3:0.9.1'
    implementation 'com.amplifyframework:aws-analytics-pinpoint:0.9.1'
}

Local Publishing of Artifacts

You can manually install the library by cloning this repo and publishing the Android modules to the local maven repository.

Execute following commands from the project root:

./gradlew publishToMavenLocal

Locally published artifacts can be accessed by specifying mavenLocal() inside the app's build.gradle file:

buildscript {
    repositories {
        mavenLocal() // This should ideally appear before other repositories
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenLocal() // This should ideally appear before other repositories
    }
}

Using Amplify

Java 8 Compatibility

Amplify Android is dependent on Java 8 features. Please add compile options inside app's build.gradle like following:

android {
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

Using AWS Mobile Client

Authentication in Amplify for Android is dependent on AWS Mobile Client. Please refer to the this documentation for details.

You need to ensure AWSMobileClient is initialized before you initalize and configure Amplify. Please note that AWSMobileClient initialization is not required when using API or Datastore category with API Key as the authorization mode.

License

This library is licensed under the Apache 2.0 License.

amplify-android's People

Contributors

desokroshan avatar jamesonwilliams avatar jpeddicord avatar mlabieniec avatar raphkim avatar royjit avatar treksoft avatar

Watchers

 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.