diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index dba65c45..cad0d8b0 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -1,13 +1,47 @@
+ android:versionCode="13"
+ android:versionName="1.6.2">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
diff --git a/README.md b/README.md
index add97436..bc4c191b 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-#Connect SDK Android
+# Connect SDK Android
[](https://travis-ci.org/ConnectSDK/Connect-SDK-Android)
[](https://codecov.io/github/ConnectSDK/Connect-SDK-Android)
@@ -15,7 +15,7 @@ For more information, visit our [website](http://www.connectsdk.com/).
* [Platform documentation & FAQs](http://www.connectsdk.com/docs/android/)
* [API documentation](http://www.connectsdk.com/apis/android/)
-##Dependencies
+## Dependencies
This project has the following dependencies, some of which require manual setup. If you would like to use a version of the SDK which has no manual setup, consider using the [lite version](https://github.com/ConnectSDK/Connect-SDK-Android-Lite) of the SDK.
This project has the following dependencies.
@@ -27,7 +27,7 @@ This project has the following dependencies.
* [Connect-SDK-Android-FireTV](https://github.com/ConnectSDK/Connect-SDK-Android-FireTV) submodule
- Requires [AmazonFling.framework](https://developer.amazon.com/public/apis/experience/fling/docs/amazon-fling-sdk-download)
-##Including Connect SDK in your app with Android Studio
+## Including Connect SDK in your app with Android Studio
Edit your project's build.gradle to add this in the "dependencies" section
```groovy
dependencies {
@@ -38,7 +38,7 @@ dependencies {
This prebuilt library doesn't have Amazon Fling SDK support, because it’s not available on maven. You need to set the project up from sources
if you want to have Amazon Fling SDK support.
-##Including Connect SDK in your app with Android Studio from sources
+## Including Connect SDK in your app with Android Studio from sources
1. Open your terminal and execute these commands
```
cd your_project_folder
@@ -64,7 +64,7 @@ if you want to have Amazon Fling SDK support.
5. Sync project with gradle files
6. Add permissions to your manifest
-###Permissions to include in manifest
+### Permissions to include in manifest
* Required for SSDP & Chromecast/Zeroconf discovery
- `android.permission.INTERNET`
- `android.permission.CHANGE_WIFI_MULTICAST_STATE`
@@ -82,7 +82,7 @@ if you want to have Amazon Fling SDK support.
```
-###Metadata for application tag
+### Metadata for application tag
This metadata tag is necessary to enable Chromecast support.
```xml
@@ -96,14 +96,14 @@ This metadata tag is necessary to enable Chromecast support.
```
-###Proguard configuration
+### Proguard configuration
Add the following line to your proguard configuration file (otherwise `DiscoveryManager` won't be able to set any `DiscoveryProvider`).
```
-keep class com.connectsdk.** { * ; }
```
-###Tests
+### Tests
Connect SDK has unit tests for some parts of the code, and we are continuing to increase the test coverage.
These tests are based on third party libraries such as Robolectric, Mockito and PowerMock. You can easily run these tests with Gradle:
```
@@ -115,9 +115,9 @@ gradle jacocoTestReport
```
The test coverage report will be in this folder `Connect-SDK-Android/build/reports/jacoco/jacocoTestReport/html`.
-##Limitations/Caveats
+## Limitations/Caveats
-###Subtitles
+### Subtitles
- DLNA service support `SRT` format only. Since there is no official specification for them, subtitles may not work on all DLNA-compatible devices. This feature has been tested and works on LG WebOS and Netcast TVs.
- FireTV service supports `WebVTT` format only. Subtitles on Fire TV are hidden by default. To display them, the user should manually pick one in the media player (click the "Options" button on the remote). The Fling SDK doesn't provide any way to make them appear remotely.
@@ -127,14 +127,14 @@ The test coverage report will be in this folder `Connect-SDK-Android/build/repor
-##Contact
+## Contact
* Twitter [@ConnectSDK](https://www.twitter.com/ConnectSDK)
* Ask a question on Stack Overflow with the [Connect-SDK tag](https://stackoverflow.com/tags/connect-sdk) (or [TV tag](https://stackoverflow.com/tags/tv))
* General Inquiries info@connectsdk.com
* Developer Support support@connectsdk.com
* Partnerships partners@connectsdk.com
-##Credits
+## Credits
Connect SDK for Android makes use of the following projects, some of which are open-source.
* [Amazon Fling SDK](https://developer.amazon.com/fling)
@@ -152,7 +152,7 @@ These projects are used in tests:
* [PowerMock](https://github.com/jayway/powermock) (Apache License, Version 2.0)
* [XMLUnit](http://www.xmlunit.org/) (Apache License, Version 2.0)
-##License
+## License
Copyright (c) 2013-2015 LG Electronics.
Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/build.gradle b/build.gradle
index 26881923..6f1d832e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,23 +1,27 @@
buildscript {
repositories {
- jcenter()
+ google()
+ mavenCentral()
}
dependencies {
- classpath 'com.android.tools.build:gradle:1.2.3'
- classpath 'org.robolectric:robolectric-gradle-plugin:1.1.0'
+ classpath 'com.android.tools.build:gradle:4.0.1'
+ classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
}
allprojects {
repositories {
- jcenter()
+ google()
+ mavenCentral()
+ maven { url "https://jitpack.io" }
}
}
apply plugin: 'com.android.library'
-apply plugin: 'org.robolectric'
apply plugin: 'jacoco'
+apply plugin: 'com.github.dcendents.android-maven'
+group='com.github.ConnectSDK'
jacoco {
toolVersion = "0.7.1.201405082137"
@@ -28,7 +32,7 @@ task jacocoTestReport(type:JacocoReport, dependsOn: "check") {
description = "Generate Jacoco coverage reports"
- classDirectories = fileTree(
+ getClassDirectories().setFrom(
dir: 'build/intermediates/classes/debug',
excludes: ['**/R.class',
'**/R$*.class',
@@ -37,9 +41,9 @@ task jacocoTestReport(type:JacocoReport, dependsOn: "check") {
'**/Manifest*.*']
)
- additionalSourceDirs = files(android.sourceSets.main.java.srcDirs)
- sourceDirectories = files(android.sourceSets.main.java.srcDirs)
- executionData = files('build/jacoco/testDebug.exec')
+ additionalSourceDirs.from = android.sourceSets.main.java.srcDirs
+ sourceDirectories.from = android.sourceSets.main.java.srcDirs
+ executionData.from = 'build/jacoco/testDebug.exec'
reports {
xml.enabled = true
@@ -51,8 +55,13 @@ task jacocoTestReport(type:JacocoReport, dependsOn: "check") {
build.dependsOn jacocoTestReport
android {
- compileSdkVersion 22
- buildToolsVersion '22.0.1'
+ compileSdkVersion 32
+ buildToolsVersion '30.0.3'
+
+ defaultConfig {
+ minSdkVersion 24
+ targetSdkVersion 32
+ }
packagingOptions {
exclude 'LICENSE.txt'
@@ -73,8 +82,9 @@ android {
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
- res.srcDirs = ['res']
+ res.srcDirs = ['core/res']
assets.srcDirs = ['assets']
+ jniLibs.srcDirs = ['core/jniLibs']
}
test {
java.srcDirs = [
@@ -97,29 +107,42 @@ android {
abortOnError false
}
}
+
+ compileOptions {
+ sourceCompatibility JavaVersion.VERSION_1_8
+ targetCompatibility JavaVersion.VERSION_1_8
+ }
+ useLibrary 'org.apache.http.legacy'
+ ndkVersion "22.1.7171670"
}
android.testOptions.unitTests.all {
- include '**/*Test.class'
- }
+ include '**/*Test.class'
+}
dependencies {
- compile files('core/libs/java-websocket-patch.jar')
- compile files('core/libs/javax.jmdns_3.4.1-patch2.jar')
-
- compile fileTree(dir: 'modules/firetv/libs', include: '*.jar')
-
- compile 'com.android.support:support-v4:22.2.1'
- compile 'com.android.support:appcompat-v7:22.2.1'
- compile 'com.android.support:mediarouter-v7:22.2.1'
- compile 'com.google.android.gms:play-services-cast:7.8.0'
-
- testCompile 'org.apache.maven:maven-ant-tasks:2.1.3'
- testCompile 'junit:junit:4.12'
- testCompile 'org.robolectric:robolectric:2.4'
- testCompile 'org.mockito:mockito-all:1.10.19'
- testCompile 'org.powermock:powermock-api-mockito:1.6.2'
- testCompile 'xmlunit:xmlunit:1.4'
+ implementation 'org.java-websocket:Java-WebSocket:1.5.0'
+ implementation 'javax.jmdns:jmdns:3.4.1'
+
+ implementation fileTree(dir: 'modules/firetv/libs', include: '*.jar')
+
+
+ implementation 'androidx.mediarouter:mediarouter:1.2.0'
+ implementation 'androidx.annotation:annotation:1.0.0'
+ implementation 'androidx.preference:preference:1.1.1'
+ implementation 'androidx.appcompat:appcompat:1.3.1' // 1.4.1 version doesn't support compile sdk 30
+ implementation 'com.googlecode.plist:dd-plist:1.23'
+ implementation 'com.nimbusds:srp6a:2.1.0'
+ implementation 'net.i2p.crypto:eddsa:0.3.0'
+ implementation 'com.google.android.gms:play-services-cast-framework:9.4.0'
+ implementation files('core/libs/lgcast-android-lib.jar')
+
+ testImplementation 'org.apache.maven:maven-ant-tasks:2.1.3'
+ testImplementation 'junit:junit:4.12'
+ testImplementation 'org.robolectric:robolectric:2.4'
+ testImplementation 'org.mockito:mockito-all:1.10.19'
+ testImplementation 'org.powermock:powermock-api-mockito:1.6.2'
+ testImplementation 'xmlunit:xmlunit:1.4'
}
apply from: 'maven-push.gradle'
diff --git a/core b/core
index 2c04b6f2..7e412a0d 160000
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit 2c04b6f2112e3b26c08b8c5635af929b882f4354
+Subproject commit 7e412a0d99d7b7dd7e2e84d9977fab215ad0f1dc
diff --git a/gradle.properties b/gradle.properties
index 6b5a82f0..6027ac45 100755
--- a/gradle.properties
+++ b/gradle.properties
@@ -3,8 +3,8 @@ POM_NAME=Connect SDK Android
POM_ARTIFACT_ID=connect-sdk-android
POM_PACKAGING=aar
-VERSION_NAME=1.6.0
-VERSION_CODE=12
+VERSION_NAME=1.6.2
+VERSION_CODE=13
GROUP=com.connectsdk
POM_DESCRIPTION=Connect SDK is an open source framework that connects your mobile apps with multiple TV platforms. Because most TV platforms support a variety of protocols, Connect SDK integrates and abstracts the discovery and connectivity between all supported protocols.
@@ -24,4 +24,6 @@ POM_DEVELOPER_NAME=change
SNAPSHOT_REPOSITORY_URL=https://oss.sonatype.org/content/repositories/snapshots
RELEASE_REPOSITORY_URL=https://oss.sonatype.org/service/local/staging/deploy/maven2
-
+android.useAndroidX=true
+# Automatically convert third-party libraries to use AndroidX
+android.enableJetifier=true
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 00000000..f6b961fd
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000..936b91b6
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Wed Sep 02 13:30:49 KST 2020
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
diff --git a/gradlew b/gradlew
new file mode 100755
index 00000000..cccdd3d5
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/jitpack.yml b/jitpack.yml
new file mode 100644
index 00000000..7b0e6fb4
--- /dev/null
+++ b/jitpack.yml
@@ -0,0 +1,6 @@
+jdk:
+ - openjdk11
+before_install:
+ - ./gradlew clean publishToMavenLocal
+install:
+ - ./gradlew clean install
diff --git a/modules/firetv b/modules/firetv
index 0c07d038..fb17bbf6 160000
--- a/modules/firetv
+++ b/modules/firetv
@@ -1 +1 @@
-Subproject commit 0c07d03880f1f457107aa8dbc078bbd6404437fc
+Subproject commit fb17bbf646f69e4ba92651a0b20a0f6db363d86c
diff --git a/modules/google_cast b/modules/google_cast
index 809e5b48..0ea867d2 160000
--- a/modules/google_cast
+++ b/modules/google_cast
@@ -1 +1 @@
-Subproject commit 809e5b48f081dab93801ba17b86c1b29ec6ad89c
+Subproject commit 0ea867d2a232ab17cb4856232cd3913d3c39e93c
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 00000000..88fe060d
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,10 @@
+
+ 4.0.0
+ com.github.ConnectSDK
+ connect-sdk-android
+ 1.6.2
+
+ core/src
+
+
diff --git a/res/values/connect_sdk_strings.xml b/res/values/connect_sdk_strings.xml
deleted file mode 100644
index 9a70ad2e..00000000
--- a/res/values/connect_sdk_strings.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
- Select a device
- Pairing request
- Confirm pairing on the TV
- Enter pairing code displayed on TV
- Enter pairing code displayed on TV
-