• Stars
    star
    1,009
  • Rank 45,557 (Top 0.9 %)
  • Language
    Java
  • License
    Other
  • Created over 10 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

AWS SDK for Android. For more information, see our web site:

AWS SDK for Android

DiscordChat GitHub release Maven Central

For new projects, we recommend using the latest v2 version of AWS Amplify Library for Android to quickly implement common app use cases like Authentication, Storage, Push Notifications and more.

Note: v2 of Amplify Library for Android (currently GA) is built on top of the AWS SDK for Kotlin. You can access this underlying SDK via the Escape Hatch from AWS Amplify.

You can also use AWS Amplify with your existing AWS cloud resources. If you are unable to find features you are looking for in Amplify, please open an issue in the Amplify Library for Android GitHub repo and we will be happy to consider you request.

If you still wish to use the AWS SDK for Android directly, you can refer to the AWS SDK Documentation here and follow the installation instructions below.

The AWS SDK for Android is a collection of low-level libraries for direct interaction with AWS backend services. For use cases not covered by the Amplify Framework, you may directly integrate these clients into your Android app.

Installation

The AWS SDK for Android can be directly embedded via .aar files, or you can download it from the Maven Central repository, by integrating it into your Android project's Gradle files.

From Maven

We recommend obtaining the dependency from Maven. To do so, add a dependency to your app's (module-level) build.gradle, in the dependencies section:

dependencies {
    implementation 'com.amazonaws:aws-android-sdk-SERVICE:2.x.y'
}

Above, SERVICE might be s3, ddb, pinpoint, etc. A full list is provided below.

Available Modules

  • apigateway-core
  • auth-core
  • auth-facebook
  • auth-google
  • auth-ui
  • auth-userpools
  • chimesdkidentity
  • chimesdkmessaging
  • cloudwatch
  • cognitoauth
  • cognitoidentityprovider
  • cognitoidentityprovider-asf
  • comprehend
  • connect
  • connectparticipant
  • core
  • ddb
  • ddb-document
  • ddb-mapper
  • ec2
  • iot
  • kinesis
  • kinesisvideo
  • kinesisvideo-archivedmedia
  • kinesisvideo-signaling
  • kms
  • lambda
  • lex
  • location
  • logs
  • machinelearning
  • mobile-client
  • pinpoint
  • polly
  • rekognition
  • s3
  • sagemaker-runtime
  • sdb
  • ses
  • sns
  • sqs
  • testutils
  • textract
  • transcribe
  • translate

SDK Fundamentals

There are a few fundamentals that are helpful to know when developing against the AWS SDK for Android.

  • Never embed credentials in an Android application. It is trivially easy to decompile applications and steal embedded credentials. Always use temporarily vended credentials from services such as Amazon Cognito Identity.
  • Unless explicitly stated, calls are synchronous and must be taken off of the main thread.
  • Unless explicitly stated, calls can always throw an AmazonServiceException or an AmazonClientException (depending on if the exception is generated by the service or the client respectively).
  • The SDK will handle re-trying requests automatically, but unless explicitly stated will throw an exception if it cannot contact AWS.
  • We are always looking to help, please feel free to open an issue.

Versioning

The Android SDK is versioned like 2.x.y. 2 is a product identifier that never changes. x is bumped when there are breaking changes. y is bumped for not-breaking bugfixes, or for the introduction of new features/capabilities.

Building the SDK

Pre-requisites

The AWS Core Runtime (aws-android-sdk-core) module builds against Android API Level 23. Please download and install Android API Level 23 through SDK Manager in Android Studio, before building the SDK.

Set the ANDROID_HOME environment variable, to the root directory of your Android SDK installation.

For example, on a Mac OS X where Android Studio has been installed, the SDK comes bundled with it.

export ANDROID_HOME="$HOME/Library/Android/sdk"

Build

./gradlew build

Consuming Development Versions

Once you've built the SDK, you can manually install the SDK by publishing its artifacts to your local Maven repository.

The local Maven repository is usually found in your home directory at ~/.m2/repository.

To publish the outputs of the build, execute the following command from the root of the amplify-android project:

./gradlew publishToMavenLocal

After this, you can use the published development artifacts from an app. To do so, specify mavenLocal() inside the app's top-level build.gradle(Project) file:

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

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

Then, find the VERSION_NAME of the library inside gradle.properties file.

Use the above version to specify dependencies in your app's build.gradle (:app) file:

dependencies {
    implementation 'com.amazonaws:aws-android-sdk-SERVICE:VERSION_NAME'
}

Talk to Us

Come chat with us on our Discord Channel.

Report bugs to our GitHub Issues page.

Author

Amazon Web Services

License

See the LICENSE.txt for more info.

More Repositories

1

amplify-js

A declarative JavaScript library for application development using cloud services.
TypeScript
9,360
star
2

amplify-cli

The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development.
TypeScript
2,783
star
3

aws-sdk-ios

AWS SDK for iOS. For more information, see our web site:
Objective-C
1,657
star
4

amplify-flutter

A declarative library with an easy-to-use interface for building Flutter applications on AWS.
Dart
1,282
star
5

amplify-ui

Amplify UI is a collection of accessible, themeable, performant React (and more!) components that can connect directly to the cloud.
TypeScript
759
star
6

docs

AWS Amplify Framework Documentation
MDX
471
star
7

amplify-hosting

AWS Amplify Hosting provides a Git-based workflow for deploying and hosting fullstack serverless web applications.
Dockerfile
439
star
8

amplify-swift

A declarative library for application development using cloud services.
Swift
423
star
9

learn

AWS Amplify Learn
JavaScript
257
star
10

amplify-android

The fastest and easiest way to use AWS from your Android app.
Java
227
star
11

amplify-studio

AWS Amplify Studio (Formerly Admin UI)
131
star
12

amplify-js-samples

A Sample Repository for Amplify JS Samples
116
star
13

amplify-backend

Home to all tools related to Amplify's code-first DX (Gen 2) for building fullstack apps on AWS
TypeScript
102
star
14

amplify-category-api

The AWS Amplify CLI is a toolchain for simplifying serverless web and mobile development. This plugin provides functionality for the API category, allowing for the creation and management of GraphQL and REST based backends for your amplify project.
TypeScript
74
star
15

amplify-codegen

Amplify Codegen is a JavaScript toolkit library for frontend and mobile developers building Amplify applications.
TypeScript
58
star
16

amplify-codegen-ui

Generate React components for use in an AWS Amplify project.
TypeScript
30
star
17

aws-sdk-ios-spm

This repository enables Swift Package Manager support for the AWS Mobile SDK for iOS
Swift
28
star
18

discord-bot

Discord bot for the AWS Amplify Discord Server
TypeScript
24
star
19

amplify-ios-samples

Swift
22
star
20

aws-amplify.github.io

Amplify Framework Website
HTML
20
star
21

aws-appsync-realtime-client-ios

A client implementation in Swift for the AWS AppSync service on the iOS platform.
Swift
16
star
22

amplify-ci-support

Scripts and tools for managing Amplify projects in continuous integration environments, and for local developer setup of integration test environments.
Python
16
star
23

maplibre-gl-js-amplify

TypeScript
13
star
24

maplibre-gl-draw-circle

Supports drawing/editing a circle on a Mapbox map.
JavaScript
12
star
25

amplify-cli-export-construct

TypeScript
11
star
26

amplify-ui-swift-authenticator

The Amplify UI Authenticator is a component that supports several authentiation flows using Amplify Authentication.
Swift
11
star
27

amplify-ui-android

Amplify UI for Android is a collection of accessible, themeable, performant Android components that can connect directly to the cloud.
Kotlin
9
star
28

amplify-ui-swift-liveness

This repository offers a UI component for Amazon Rekognition Face Liveness, enabling developers to ensure that only authentic users, and not bad actors using spoofs, can access their services.
Swift
8
star
29

amplify-android-samples

Samples for testing out Amplify Android libraries
Kotlin
6
star
30

amplify-ios-maplibre

An adapter to leverage Amplify Geo with the map rendering of MapLibre.
Swift
4
star
31

amplify-swift-utils-notifications

This repository serves as a dependency package for amplify-swift, providing valuable functionalities to handle push notifications on iOS and macOS platforms.
Swift
4
star
32

amplify-swift-plugin-toolkit

A toolkit for developing Swift Plugins for Amplify.
Swift
1
star