├── .gitattributes ├── NOTICE ├── lint-baseline.xml ├── app ├── libs │ └── instructions.txt ├── src │ ├── main │ │ ├── res │ │ │ ├── mipmap-hdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ ├── kinesisvideo_logo.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ ├── mipmap-mdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ ├── values │ │ │ │ ├── ic_launcher_background.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── colors.xml │ │ │ │ ├── strings.xml │ │ │ │ ├── themes.xml │ │ │ │ └── styles.xml │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ ├── ic_launcher_round.png │ │ │ │ └── ic_launcher_foreground.png │ │ │ ├── xml │ │ │ │ ├── backup_descriptor.xml │ │ │ │ ├── backup_rules.xml │ │ │ │ └── data_extraction_rules.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ │ ├── ic_launcher.xml │ │ │ │ └── ic_launcher_round.xml │ │ │ ├── drawable │ │ │ │ ├── side_nav_bar.xml │ │ │ │ ├── button_default.xml │ │ │ │ ├── button_pressed.xml │ │ │ │ ├── button_selector.xml │ │ │ │ └── ic_menu_share.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ ├── menu │ │ │ │ └── activity_simple_nav_drawer.xml │ │ │ ├── raw │ │ │ │ └── awsconfiguration.json │ │ │ ├── layout │ │ │ │ ├── content_simple_nav.xml │ │ │ │ ├── activity_simple_nav.xml │ │ │ │ ├── app_bar_simple_nav.xml │ │ │ │ ├── nav_header_simple_nav.xml │ │ │ │ ├── activity_webrtc_main.xml │ │ │ │ └── fragment_stream_webrtc_configuration.xml │ │ │ └── values-night │ │ │ │ └── themes.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── amazonaws │ │ │ │ └── kinesisvideo │ │ │ │ ├── signaling │ │ │ │ ├── Signaling.java │ │ │ │ ├── SignalingListener.java │ │ │ │ ├── okhttp │ │ │ │ │ ├── SignalingServiceWebSocketClient.java │ │ │ │ │ └── WebSocketClient.java │ │ │ │ └── model │ │ │ │ │ ├── Message.java │ │ │ │ │ └── Event.java │ │ │ │ ├── utils │ │ │ │ ├── Constants.java │ │ │ │ ├── AwsV4SignerConstants.java │ │ │ │ └── AwsV4Signer.java │ │ │ │ ├── webrtc │ │ │ │ ├── KinesisVideoSdpObserver.java │ │ │ │ └── KinesisVideoPeerConnection.java │ │ │ │ └── demoapp │ │ │ │ ├── util │ │ │ │ └── ActivityUtils.java │ │ │ │ ├── activity │ │ │ │ ├── StartUpActivity.java │ │ │ │ └── SimpleNavActivity.java │ │ │ │ ├── KinesisVideoWebRtcDemoApp.java │ │ │ │ └── fragment │ │ │ │ └── StreamWebRtcConfigurationFragment.java │ │ └── AndroidManifest.xml │ ├── test │ │ └── java │ │ │ └── com │ │ │ └── amazonaws │ │ │ └── kinesisvideo │ │ │ ├── demoapp │ │ │ └── ExampleUnitTest.java │ │ │ ├── signaling │ │ │ └── model │ │ │ │ └── MessageTest.java │ │ │ └── utils │ │ │ └── AwsV4SignerTest.java │ └── androidTest │ │ └── java │ │ └── com │ │ └── amazonaws │ │ └── kinesisvideo │ │ └── demoapp │ │ └── ExampleInstrumentedTest.java ├── proguard-rules.pro └── build.gradle ├── RELEASE_NOTES.md ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── CODE_OF_CONDUCT.md ├── .gitignore ├── settings.gradle ├── .github └── workflows │ └── ci.yml ├── gradle.properties ├── THIRD-PARTY-LICENSES.txt ├── gradlew.bat ├── CONTRIBUTING.md ├── gradlew ├── README.md └── LICENSE /.gitattributes: -------------------------------------------------------------------------------- 1 | *.aar binary 2 | *.jar binary 3 | gradlew* binary -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. 2 | -------------------------------------------------------------------------------- /lint-baseline.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/libs/instructions.txt: -------------------------------------------------------------------------------- 1 | If you have binaries that you would like to import (example: libwebrtc.aar), place them in this folder. -------------------------------------------------------------------------------- /RELEASE_NOTES.md: -------------------------------------------------------------------------------- 1 | 2 | #### Release 1.0.0 (4th Dec 2019) 3 | 4 | - Kinesis Video Streams Android WebRTC SDK feature support 5 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-android/master/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-android/master/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-android/master/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-android/master/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/values/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFFFFF 4 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-android/master/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-android/master/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-android/master/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/kinesisvideo_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-android/master/app/src/main/res/mipmap-hdpi/kinesisvideo_logo.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-android/master/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-android/master/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-android/master/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-android/master/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-android/master/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-android/master/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-android/master/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-android/master/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-android/master/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /app/src/main/res/xml/backup_descriptor.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Thu Sep 07 11:17:34 PDT 2023 2 | distributionBase=GRADLE_USER_HOME 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 3 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 4 | opensource-codeofconduct@amazon.com with any additional questions or comments. 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/side_nav_bar.xml: -------------------------------------------------------------------------------- 1 | 3 | 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | .idea/ 4 | /local.properties 5 | /.idea/caches 6 | /.idea/libraries 7 | /.idea/modules.xml 8 | /.idea/workspace.xml 9 | /.idea/navEditor.xml 10 | /.idea/assetWizardSettings.xml 11 | .DS_Store 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | app/libs/libwebrtc-* 17 | app/src/main/res/raw/awsconfiguration.json 18 | app/build 19 | 20 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_pressed.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 10 | 11 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | gradlePluginPortal() 4 | google() 5 | mavenCentral() 6 | } 7 | } 8 | dependencyResolutionManagement { 9 | repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 10 | repositories { 11 | google() 12 | mavenCentral() 13 | } 14 | } 15 | rootProject.name = "amazon-kinesis-video-streams-webrtc-sdk-android" 16 | include ':app' 17 | -------------------------------------------------------------------------------- /app/src/main/java/com/amazonaws/kinesisvideo/signaling/Signaling.java: -------------------------------------------------------------------------------- 1 | package com.amazonaws.kinesisvideo.signaling; 2 | 3 | 4 | import com.amazonaws.kinesisvideo.signaling.model.Event; 5 | 6 | 7 | public interface Signaling { 8 | 9 | void onSdpOffer(Event event); 10 | 11 | void onSdpAnswer(Event event); 12 | 13 | void onIceCandidate(Event event); 14 | 15 | void onError(Event event); 16 | 17 | void onException(Exception e); 18 | } 19 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 20dp 4 | 70dp 5 | 1dp 6 | 2dp 7 | 160dp 8 | 16dp 9 | 10 | -------------------------------------------------------------------------------- /app/src/test/java/com/amazonaws/kinesisvideo/demoapp/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.amazonaws.kinesisvideo.demoapp; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /app/src/main/res/menu/activity_simple_nav_drawer.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/xml/backup_rules.xml: -------------------------------------------------------------------------------- 1 | 8 | 9 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/raw/awsconfiguration.json: -------------------------------------------------------------------------------- 1 | { 2 | "Version": "1.0", 3 | "CredentialsProvider": { 4 | "CognitoIdentity": { 5 | "Default": { 6 | "PoolId": "REPLACE_ME", 7 | "Region": "REPLACE_ME" 8 | } 9 | } 10 | }, 11 | "IdentityManager": { 12 | "Default": {} 13 | }, 14 | "CognitoUserPool": { 15 | "Default": { 16 | "AppClientSecret": "REPLACE_ME - or remove this line if AppClient does not use a client secret.", 17 | "AppClientId": "REPLACE_ME", 18 | "PoolId": "REPLACE_ME", 19 | "Region": "REPLACE_ME" 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #FFBB86FC 4 | #FF6200EE 5 | #FF3700B3 6 | #FF03DAC5 7 | #FF018786 8 | #FF000000 9 | #FFFFFFFF 10 | #404142 11 | #CBCBCB 12 | #329AD6 13 | #2A5C91 14 | -------------------------------------------------------------------------------- /app/src/main/res/xml/data_extraction_rules.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 12 | 13 | 19 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_selector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 11 | 15 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/layout/content_simple_nav.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_menu_share.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | AWSKinesisVideoWebRTCDemoApp 3 | 4 | Channel Configuration 5 | AWS KinesisVideo WebRTC Demo 6 | 7 | SimpleNavActivity 8 | WebRtcActivity 9 | 10 | Open navigation drawer 11 | Close navigation drawer 12 | KVS WebRTC Data Channel Notification Channel 13 | This channel shows all messages coming from WebRTC. 14 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /app/src/main/java/com/amazonaws/kinesisvideo/utils/Constants.java: -------------------------------------------------------------------------------- 1 | package com.amazonaws.kinesisvideo.utils; 2 | 3 | import com.amazonaws.kinesisvideo.demoapp.BuildConfig; 4 | 5 | public class Constants { 6 | /** 7 | * SDK identifier 8 | */ 9 | public static final String APP_NAME = "aws-kvs-webrtc-android-client"; 10 | /** 11 | * SDK version identifier 12 | */ 13 | public static final String VERSION = BuildConfig.VERSION_NAME; 14 | 15 | /** 16 | * Query parameter for Channel ARN. Used for calling Kinesis Video Websocket APIs. 17 | */ 18 | public static final String CHANNEL_ARN_QUERY_PARAM = "X-Amz-ChannelARN"; 19 | 20 | /** 21 | * Query parameter for Client Id. Only used for viewers. Used for calling Kinesis Video Websocket APIs. 22 | */ 23 | public static final String CLIENT_ID_QUERY_PARAM = "X-Amz-ClientId"; 24 | } 25 | -------------------------------------------------------------------------------- /app/src/main/res/values/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/values-night/themes.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: AWS KVS WebRTC Android SDK CI 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | - develop 8 | pull_request: 9 | branches: 10 | - master 11 | - develop 12 | jobs: 13 | build: 14 | strategy: 15 | matrix: 16 | os: [ubuntu-latest, macos-latest] 17 | java: [11, 17] 18 | runs-on: ${{ matrix.os }} 19 | steps: 20 | - name: Checkout code 21 | uses: actions/checkout@v4 22 | 23 | - name: Set up JDK 24 | uses: actions/setup-java@v4 25 | with: 26 | distribution: 'corretto' 27 | java-version: ${{ matrix.java }} 28 | 29 | - name: Download libwebrtc 30 | run: wget -O app/libs/libwebrtc-115.0.0.aar https://github.com/rno/WebRTC/releases/download/115.0.0/libwebrtc-115.0.0.aar 31 | 32 | - name: Build with Gradle 33 | run: ./gradlew build 34 | 35 | - name: Run tests 36 | run: ./gradlew test 37 | -------------------------------------------------------------------------------- /app/src/androidTest/java/com/amazonaws/kinesisvideo/demoapp/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.amazonaws.kinesisvideo.demoapp; 2 | 3 | import android.content.Context; 4 | 5 | import androidx.test.platform.app.InstrumentationRegistry; 6 | import androidx.test.ext.junit.runners.AndroidJUnit4; 7 | 8 | import org.junit.Test; 9 | import org.junit.runner.RunWith; 10 | 11 | import static org.junit.Assert.*; 12 | 13 | /** 14 | * Instrumented test, which will execute on an Android device. 15 | * 16 | * @see Testing documentation 17 | */ 18 | @RunWith(AndroidJUnit4.class) 19 | public class ExampleInstrumentedTest { 20 | @Test 21 | public void useAppContext() { 22 | // Context of the app under test. 23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); 24 | assertEquals("com.example.testapplication", appContext.getPackageName()); 25 | } 26 | } -------------------------------------------------------------------------------- /app/src/main/java/com/amazonaws/kinesisvideo/webrtc/KinesisVideoSdpObserver.java: -------------------------------------------------------------------------------- 1 | package com.amazonaws.kinesisvideo.webrtc; 2 | 3 | import android.util.Log; 4 | 5 | import org.webrtc.SdpObserver; 6 | import org.webrtc.SessionDescription; 7 | 8 | public class KinesisVideoSdpObserver implements SdpObserver { 9 | 10 | protected static final String TAG = KinesisVideoSdpObserver.class.getSimpleName(); 11 | 12 | @Override 13 | public void onCreateSuccess(final SessionDescription sessionDescription) { 14 | 15 | Log.d(TAG, "onCreateSuccess(): SDP=" + sessionDescription.description); 16 | } 17 | 18 | @Override 19 | public void onSetSuccess() { 20 | 21 | Log.d(TAG, "onSetSuccess(): SDP"); 22 | } 23 | 24 | @Override 25 | public void onCreateFailure(String error) { 26 | 27 | Log.e(TAG, "onCreateFailure(): Error=" + error); 28 | } 29 | 30 | @Override 31 | public void onSetFailure(String error) { 32 | 33 | Log.e(TAG, "onSetFailure(): Error=" + error); 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/java/com/amazonaws/kinesisvideo/utils/AwsV4SignerConstants.java: -------------------------------------------------------------------------------- 1 | package com.amazonaws.kinesisvideo.utils; 2 | 3 | public final class AwsV4SignerConstants { 4 | static final String ALGORITHM_AWS4_HMAC_SHA_256 = "AWS4-HMAC-SHA256"; 5 | static final String AWS4_REQUEST_TYPE = "aws4_request"; 6 | static final String SERVICE = "kinesisvideo"; 7 | static final String X_AMZ_ALGORITHM = "X-Amz-Algorithm"; 8 | static final String X_AMZ_CREDENTIAL = "X-Amz-Credential"; 9 | static final String X_AMZ_DATE = "X-Amz-Date"; 10 | static final String X_AMZ_EXPIRES = "X-Amz-Expires"; 11 | static final String X_AMZ_SECURITY_TOKEN = "X-Amz-Security-Token"; 12 | static final String X_AMZ_SIGNATURE = "X-Amz-Signature"; 13 | static final String X_AMZ_SIGNED_HEADERS = "X-Amz-SignedHeaders"; 14 | static final String NEW_LINE_DELIMITER = "\n"; 15 | static final String DATE_PATTERN = "yyyyMMdd"; 16 | static final String TIME_PATTERN = "yyyyMMdd'T'HHmmss'Z'"; 17 | static final String METHOD = "GET"; 18 | static final String SIGNED_HEADERS = "host"; 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/amazonaws/kinesisvideo/demoapp/util/ActivityUtils.java: -------------------------------------------------------------------------------- 1 | package com.amazonaws.kinesisvideo.demoapp.util; 2 | 3 | import android.app.Activity; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | import android.os.Bundle; 7 | 8 | @SuppressWarnings("WeakerAccess") 9 | public class ActivityUtils { 10 | private static final Bundle NO_EXTRAS = null; 11 | 12 | public static void startActivity( 13 | final Context context, 14 | final Class activityClass) { 15 | 16 | startActivity(context, activityClass, NO_EXTRAS); 17 | } 18 | 19 | public static void startActivity( 20 | final Context context, 21 | final Class activityClass, 22 | final Bundle extras) { 23 | 24 | final Intent intent = new Intent(context, activityClass); 25 | 26 | if (extras != null) { 27 | intent.putExtras(extras); 28 | } 29 | 30 | context.startActivity(intent); 31 | } 32 | 33 | private ActivityUtils() { 34 | // no-op 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_simple_nav.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 16 | 17 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /app/src/main/res/layout/app_bar_simple_nav.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 14 | 15 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 10 | # When configured, Gradle will run in incubating parallel mode. 11 | # This option should only be used with decoupled projects. More details, visit 12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 13 | # org.gradle.parallel=true 14 | # AndroidX package structure to make it clearer which packages are bundled with the 15 | # Android operating system, and which are packaged with your app"s APK 16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn 17 | android.useAndroidX=true 18 | # Enables namespacing of each library's R class so that its R class includes only the 19 | # resources declared in the library itself and none from the library's dependencies, 20 | # thereby reducing the size of the R class for that library 21 | android.nonTransitiveRClass=true -------------------------------------------------------------------------------- /app/src/test/java/com/amazonaws/kinesisvideo/signaling/model/MessageTest.java: -------------------------------------------------------------------------------- 1 | package com.amazonaws.kinesisvideo.signaling.model; 2 | 3 | import static org.junit.Assert.*; 4 | 5 | import org.junit.Test; 6 | 7 | public class MessageTest { 8 | 9 | @Test 10 | public void when_setMessagePayload_then_sameGetReturnsSameMessagePayload() { 11 | final String testPayload = "test payload"; 12 | final Message message = new Message(); 13 | message.setMessagePayload(testPayload); 14 | 15 | assertEquals(testPayload, message.getMessagePayload()); 16 | } 17 | 18 | @Test 19 | public void when_setAction_then_sameGetReturnsSameAction() { 20 | final String testAction = "SDP_OFFER"; 21 | final Message message = new Message(); 22 | message.setAction(testAction); 23 | 24 | assertEquals(testAction, message.getAction()); 25 | } 26 | 27 | @Test 28 | public void when_setRecipientClientId_then_sameGetReturnsSameRecipientClientId() { 29 | final String testRecipientClientId = "viewer"; 30 | final Message message = new Message(); 31 | message.setRecipientClientId(testRecipientClientId); 32 | 33 | assertEquals(testRecipientClientId, message.getRecipientClientId()); 34 | } 35 | 36 | @Test 37 | public void when_setSenderClientId_then_sameGetReturnsSameSenderClientId() { 38 | final String testSenderClientId = "master"; 39 | final Message message = new Message(); 40 | message.setSenderClientId(testSenderClientId); 41 | 42 | assertEquals(testSenderClientId, message.getSenderClientId()); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /THIRD-PARTY-LICENSES.txt: -------------------------------------------------------------------------------- 1 | ============================ 2 | Copyright (c) 2011, The WebRTC project authors. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | 11 | * Redistributions in binary form must reproduce the above copyright 12 | notice, this list of conditions and the following disclaimer in 13 | the documentation and/or other materials provided with the 14 | distribution. 15 | 16 | * Neither the name of Google nor the names of its contributors may 17 | be used to endorse or promote products derived from this software 18 | without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | -------------------------------------------------------------------------------- /app/src/main/res/layout/nav_header_simple_nav.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 24 | 25 | 32 | 33 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | 21 | 22 | 26 | 27 | 30 | 31 | 34 | 35 | 37 | 38 |