Amazon Kinesis Video Streams
Developer Guide

Step 1: Download and Configure the Android Producer Library Code

In this section of the Android Producer Library procedure, you download the Android example code and open the project in Android Studio.

For prerequisites and other details about this example, see Using the Android Producer Library.

  1. Create a directory, and then clone the AWS Android SDK from the GitHub repository.

    $ git clone https://github.com/awslabs/aws-sdk-android-samples
  2. Open Android Studio.

  3. In the opening screen, choose Open an existing Android Studio project.

  4. Navigate to the aws-sdk-android-samples/AmazonKinesisVideoDemoApp directory, and choose OK.

  5. Open the AmazonKinesisVideoDemoApp/src/main/res/raw/awsconfiguration.json file.

    In the CredentialsProvider node, provide the identity pool ID from the To set up an identity pool procedure in the Prerequisites section, and provide your AWS Region (for example, us-west-2).

    In the CognitoUserPool node, provide the App client secret, App client ID, and Pool ID from the To set up a user pool procedure in the Prerequisites section, and provide your AWS Region (for example, us-west-2).

  6. Your awsconfiguration.json file will look similar to the following:

    { "Version": "1.0", "CredentialsProvider": { "CognitoIdentity": { "Default": { "PoolId": "us-west-2:01234567-89ab-cdef-0123-456789abcdef", "Region": "us-west-2" } } }, "IdentityManager": { "Default": {} }, "CognitoUserPool": { "Default": { "AppClientSecret": "abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmno", "AppClientId": "0123456789abcdefghijklmnop", "PoolId": "us-west-2_qRsTuVwXy", "Region": "us-west-2" } } }
  7. Update the StreamingFragment.java file with your region:

    try { mKinesisVideoClient = KinesisVideoAndroidClientFactory.createKinesisVideoClient( getActivity(), KinesisVideoDemoApp.KINESIS_VIDEO_REGION, KinesisVideoDemoApp.getCredentialsProvider());

    For AWS region constants, see Regions.

Next Step

Step 2: Examine the Code

On this page: