Skip to content
Android SDK for interfacing with Amazon Kinesis Video Streams Signaling Service.
Java
Branch: master
Clone or download
disa6302 Merge pull request #9 from awslabs/KinesisVideo-5265-add-travis-code-…
…cov-android

Fixing test report upload failure into codecov
Latest commit a6da101 Dec 28, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle/wrapper Bugfix: Fix remote viewer connection start early failure and reset au… Dec 24, 2019
libs Use pre-built AndroidX version of aws-android-sdk-auth-ui to avoid crash Dec 19, 2019
src Bugfix: Fix remote viewer connection start early failure and reset au… Dec 24, 2019
.gitignore
.travis.yml Fixing test report upload failure into codecov Dec 27, 2019
CODE_OF_CONDUCT.md Release readiness Nov 22, 2019
CONTRIBUTING.md
LICENSE Release readiness Nov 22, 2019
NOTICE Initial commit Nov 8, 2019
README.md Added the CI and Codecov icons Dec 24, 2019
RELEASE_NOTES.md Release 1.0.0 Dec 13, 2019
build.gradle Fixing test report upload failure into codecov Dec 27, 2019
gradlew Setup Travis (#3) Dec 16, 2019
gradlew.bat Setup Travis (#3) Dec 16, 2019
jacoco.gradle [KinesisVideo-5265] Add travis and CodeCov for the SDK Dec 26, 2019
lint-baseline.xml Release 1.0.0 Dec 13, 2019

README.md

Amazon Kinesis Video Streams Android WebRTC SDK

Build Status Coverage Status

Running KinesisVideoWebRTCDempApp Sample

1. Download the WebRTC SDK for Android

To download the Kinesis Video Streams WebRTC SDK in Android, run the following command:

git clone https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-android.git

2. Create a user pool

Setup user pool for secure login using Cognito:

  • Go to https://console.aws.amazon.com/cognito/
  • Click Manage your User Pools
  • Click Create a user pool
  • Fill-in Pool name
  • Click Review defaults
  • Click Create user pool
  • Copy Pool Id
  • Select App clients in the left navigation.
  • Click Add an app client
  • Fill-in App client name
  • Click Create app client
  • Click Show details and copy App client id and App client secret

3. Create an identity pool

  • Go to https://console.aws.amazon.com/cognito/
  • Click Manage Federated Identities
  • Click Create new identity pool
  • Fill-in Identity pool name
  • Under the heading Authentication providers, in the Cognito tab, fill-in the User Pool Id and App client id from the user pools step.
  • Click Create create
  • There will be details for 2 roles. Look at the one for authenticated identities and click Edit next to the policy document and your policy should look like this after editing:
    {
        "Version": "2012-10-17",
        "Statement": [
          {
            "Effect": "Allow",
            "Action": [
              "cognito-identity:*",
              "kinesisvideo:*"
            ],
            "Resource": [
              "*"
            ]
          }
        ]
      }
  • Click Allow
  • Copy the Identity Pool Id from the code snippets on the screen.

4. Build and run the demo application using Android Studio

  1. Import the downloaded SDK into the Android Studio integrated development environment by opening the amazon-kinesis-video-streams-webrtc-sdkandroid/build.gradle with Open an existing Android Studio project.
  2. You will need all the information from the above steps copied in clipboard, then paste them into this file on your local file awsconfiguration.json.
  3. Click gradle Sync and Build
  4. Run the demo application in simulator or in Android device (connected through USB).

5. Peer to Peer Streaming

On your Android device, open AWSKinesisVideoWebRTCDemoApp and sign up with Create New Account or sign in with existing accounts.

Note: This account information is stored in your Cognito User Pool and is not your AWS Console user name/password.

Once login is successful, you will entering the following channel information to start peer to peer streaming.

  1. Enter a channel name: e.g. demo-channel
  2. Enter AWS region: e.g. us-west-2
  3. Select audio if you would like to send both audio or video data.
  4. Optionally, when using it in viewer mode, you can enter a unique Client Id . Client ID is required only if multiple viewers are connected to a channel. This helps channel's master identify respective viewers.

To verify peer to peer streaming, do any of the following setup. In these setup, ensure that the signaling channel name, region, viewer ID, and the AWS account ID are the same.

5.1 Peer to Peer Streaming between two Android device: Master and Viewer

  • Start one Android device in master mode for starting a new session. Remote peer will be joining as viewer to this master. There should be only one master for any given channel.
  • Use another Android device to connect to the same channel name (started up in the step above as master) in viewer mode; this will connect to an existing session (channel) where a master is connected.
  • Verify media showing up in both Android devices.

5.2 Peer to Peer Streaming between Embedded SDK as master and Android device as viewer

  • Run Kinesis Video Streams WebRTC embedded SDK in master mode on a camera device.
  • Start the Android device in viewer mode - you should be able to check the video (and audio if selected both in embedded SDK) showing up in the Android device from the camera.
  • Verify media showing up from the Embedded SDK to the Android.

5.3 Peer to Peer Streaming between Android device as master and Web browser as viewer

  • Start one Android device in master mode for starting a new session.
  • Start the web browser using the Javascript SDK and start it as viewer.
  • Verify media showing up from the Android device to the browser.

License

This library is licensed under the Apache 2.0 License.

You can’t perform that action at this time.