Skip to content
A declarative library for application development using cloud services.
Java Other
  1. Java 99.8%
  2. Other 0.2%
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Latest Gradle and Android Gradle Plugin Apr 2, 2020
.github Creating initial file from template Mar 21, 2019
aws-analytics-pinpoint Miscellaneous lint cleanups Apr 2, 2020
aws-api Miscellaneous lint cleanups Apr 2, 2020
aws-datastore Miscellaneous lint cleanups Apr 2, 2020
aws-storage-s3 Improve WhitespaceAround checks Mar 31, 2020
configuration Don't enforce MagicNumber check on hashCode(). Apr 1, 2020
core Miscellaneous lint cleanups Apr 2, 2020
gradle/wrapper Latest Gradle and Android Gradle Plugin Apr 2, 2020
rxbindings Miscellaneous lint cleanups Apr 2, 2020
testmodels Don't rename source file attribute in ProGuard (#305) Mar 17, 2020
testutils Improve WhitespaceAround checks Mar 31, 2020
.gitignore Add storage instrumentation tests (#290) Mar 3, 2020
CHANGELOG.md Fixes Date fields being converted to current date (#335) Mar 30, 2020
CODE_OF_CONDUCT.md Creating initial file from template Mar 21, 2019
CONTRIBUTING.md Fix path to copy-configs script (#317) Mar 20, 2020
LICENSE Creating initial file from template Mar 21, 2019
NOTICE Creating initial file from template Mar 21, 2019
README.md Advertise version 0.10.0 in the README.md. Mar 27, 2020
build.gradle Latest Gradle and Android Gradle Plugin Apr 2, 2020
gradle.properties Use "master" as the default version name (#288) Mar 2, 2020
gradlew Initial commit of Amplify Core APIs May 15, 2019
gradlew.bat Initial commit of Amplify Core APIs May 15, 2019
settings.gradle [rxbindings] Add an RxJava2 facade (#268) Feb 24, 2020

README.md

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 16 (Android 4.1) 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.10.0'
    
    // Specify only the modules that the app will use
    implementation 'com.amplifyframework:aws-datastore:0.10.0'
    implementation 'com.amplifyframework:aws-api:0.10.0'
    implementation 'com.amplifyframework:aws-storage-s3:0.10.0'
    implementation 'com.amplifyframework:aws-analytics-pinpoint:0.10.0'
}

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.6.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.

You can’t perform that action at this time.