Skip to content

Merge #422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 29 commits into
base: dev
Choose a base branch
from
Open

Merge #422

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
78a9057
PLAT-47664: LG TV Plus app crash on disconnecting TV in android 8.1.0
anishlg Jan 29, 2018
cf04ab3
Merge pull request #368 from ConnectSDK/PLAT-47664-anishtd
anishlg Jan 31, 2018
a548144
Release 1.6.2
anishlg May 7, 2018
0a7fb06
Fix issue that getVolume API is not working on webOS TV 5.0
jonghenhan Nov 19, 2019
8ca6e40
Merge pull request #378 from jonghenhan/master
seokhee-lee Jan 3, 2020
053f793
Update core submodule
jonghenhan Jun 2, 2020
1885e7f
Merge pull request #379 from jonghenhan/master
seokhee-lee Jun 2, 2020
7b4bd11
Update Connect-SDK-Android-Core
seokhee-lee Aug 28, 2020
8636c64
Update core submodule
seokhee-lee Oct 15, 2020
ece66a8
Update submodules
Apr 18, 2022
d3eec24
modified build.gradle for LG Cast
sanghyuk777lee May 2, 2022
2769016
Update README.md
lgcast-dev May 2, 2022
4f6d4cd
Update submodule core
lgcast-dev May 12, 2022
212b5a4
Merge pull request #388 from lgcast-dev/master
jonghenhan May 12, 2022
2aa4630
Update build.gradle
jonghenhan May 12, 2022
456f182
Update submodule firetv
jonghenhan May 24, 2022
abb23c8
Update submodule core
jonghenhan Jun 9, 2022
2a7090a
Update submodule core
jonghenhan Jul 4, 2022
4511bad
Update submodule core
jonghenhan Sep 14, 2022
be916e6
Update submodule core
jonghenhan Sep 14, 2022
558235d
Update submodule core
jonghenhan Oct 24, 2022
986fc0e
Update submodule core
seokhee-lee Nov 17, 2022
de01d77
Update submodule core
seokhee-lee Mar 10, 2023
f9b8a3e
Update submodule core
seokhee-lee Mar 28, 2023
3f5a9af
Update submodule core
seokhee-lee May 30, 2023
b84aa5f
Update submodule core
seokhee-lee Sep 20, 2023
31409c0
Update core Fix Fatal Exception
dung2le Sep 26, 2023
904e939
Merge pull request #406 from ducdung98tb/master
ducdung98tb Sep 26, 2023
efd400c
Update submodule core: fix NPE related to mConnectionHandler of com.c…
dung2le Mar 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 42 additions & 8 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,47 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.connectsdk"
android:versionCode="12"
android:versionName="1.6.0" >
android:versionCode="13"
android:versionName="1.6.2">

<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="22" />
<!-- Permissions for LG Cast Screen Mirroring -->
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<!-- Permissions for LG Cast Remote Camera -->
<uses-permission android:name="android.permission.CAMERA" />

<!-- Permissions for Connect SDK -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />

<application android:usesCleartextTraffic="true">

<!-- LG CAST Screen Mirroring Service -->
<service
android:name=".service.webos.lgcast.screenmirroring.service.MirroringService"
android:exported="false"
android:foregroundServiceType="mediaProjection">
<intent-filter>
<action android:name="android.intent.action.SCREEN_ON" />
<action android:name="android.intent.action.SCREEN_OFF" />
<action android:name="android.media.VOLUME_CHANGED_ACTION" />
<action android:name="android.intent.action.CONFIGURATION_CHANGED" />
</intent-filter>
</service>

<!-- LG CAST Remote Camera Service -->
<service
android:name=".service.webos.lgcast.remotecamera.service.CameraService"
android:exported="false">
<intent-filter>
<action android:name="android.intent.action.SCREEN_ON" />
<action android:name="android.intent.action.SCREEN_OFF" />
<action android:name="android.intent.action.CONFIGURATION_CHANGED" />
</intent-filter>
</service>

</application>

<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/>
<application />
</manifest>
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Connect SDK Android
# Connect SDK Android

[![Build Status](https://travis-ci.org/ConnectSDK/Connect-SDK-Android.svg)](https://travis-ci.org/ConnectSDK/Connect-SDK-Android)
[![Code Coverage](https://img.shields.io/codecov/c/github/ConnectSDK/Connect-SDK-Android/dev.svg)](https://codecov.io/github/ConnectSDK/Connect-SDK-Android)
Expand All @@ -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.
Expand All @@ -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 {
Expand All @@ -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
Expand All @@ -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`
Expand All @@ -82,7 +82,7 @@ if you want to have Amazon Fling SDK support.
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
```

###Metadata for application tag
### Metadata for application tag
This metadata tag is necessary to enable Chromecast support.

```xml
Expand All @@ -96,14 +96,14 @@ This metadata tag is necessary to enable Chromecast support.
</application>
```

###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:
```
Expand All @@ -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.
Expand All @@ -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)
Expand All @@ -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");
Expand Down
83 changes: 53 additions & 30 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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',
Expand All @@ -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
Expand All @@ -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'
Expand All @@ -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 = [
Expand All @@ -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'
2 changes: 1 addition & 1 deletion core
Submodule core updated 185 files
8 changes: 5 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
Loading