Skip to content

Commit 212b5a4

Browse files
authored
Merge pull request #388 from lgcast-dev/master
modified build.gradle for LG Cast
2 parents ece66a8 + 4f6d4cd commit 212b5a4

File tree

5 files changed

+73
-40
lines changed

5 files changed

+73
-40
lines changed

AndroidManifest.xml

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,47 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
22
package="com.connectsdk"
33
android:versionCode="13"
4-
android:versionName="1.6.2" >
4+
android:versionName="1.6.2">
55

6-
<uses-sdk
7-
android:minSdkVersion="10"
8-
android:targetSdkVersion="22" />
6+
<!-- Permissions for LG Cast Screen Mirroring -->
7+
<uses-permission android:name="android.permission.RECORD_AUDIO" />
8+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
9+
<uses-permission android:name="android.permission.INTERNET" />
10+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
11+
12+
<!-- Permissions for LG Cast Remote Camera -->
13+
<uses-permission android:name="android.permission.CAMERA" />
14+
15+
<!-- Permissions for Connect SDK -->
16+
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
17+
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
18+
19+
<application android:usesCleartextTraffic="true">
20+
21+
<!-- LG CAST Screen Mirroring Service -->
22+
<service
23+
android:name=".service.webos.lgcast.screenmirroring.service.MirroringService"
24+
android:exported="false"
25+
android:foregroundServiceType="mediaProjection">
26+
<intent-filter>
27+
<action android:name="android.intent.action.SCREEN_ON" />
28+
<action android:name="android.intent.action.SCREEN_OFF" />
29+
<action android:name="android.media.VOLUME_CHANGED_ACTION" />
30+
<action android:name="android.intent.action.CONFIGURATION_CHANGED" />
31+
</intent-filter>
32+
</service>
33+
34+
<!-- LG CAST Remote Camera Service -->
35+
<service
36+
android:name=".service.webos.lgcast.remotecamera.service.CameraService"
37+
android:exported="false">
38+
<intent-filter>
39+
<action android:name="android.intent.action.SCREEN_ON" />
40+
<action android:name="android.intent.action.SCREEN_OFF" />
41+
<action android:name="android.intent.action.CONFIGURATION_CHANGED" />
42+
</intent-filter>
43+
</service>
44+
45+
</application>
946

10-
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
11-
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/>
12-
<application />
1347
</manifest>

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Connect SDK Android
1+
# Connect SDK Android
22

33
[![Build Status](https://travis-ci.org/ConnectSDK/Connect-SDK-Android.svg)](https://travis-ci.org/ConnectSDK/Connect-SDK-Android)
44
[![Code Coverage](https://img.shields.io/codecov/c/github/ConnectSDK/Connect-SDK-Android/dev.svg)](https://codecov.io/github/ConnectSDK/Connect-SDK-Android)
@@ -15,7 +15,7 @@ For more information, visit our [website](http://www.connectsdk.com/).
1515
* [Platform documentation & FAQs](http://www.connectsdk.com/docs/android/)
1616
* [API documentation](http://www.connectsdk.com/apis/android/)
1717

18-
##Dependencies
18+
## Dependencies
1919
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.
2020

2121
This project has the following dependencies.
@@ -27,7 +27,7 @@ This project has the following dependencies.
2727
* [Connect-SDK-Android-FireTV](https://github.com/ConnectSDK/Connect-SDK-Android-FireTV) submodule
2828
- Requires [AmazonFling.framework](https://developer.amazon.com/public/apis/experience/fling/docs/amazon-fling-sdk-download)
2929

30-
##Including Connect SDK in your app with Android Studio
30+
## Including Connect SDK in your app with Android Studio
3131
Edit your project's build.gradle to add this in the "dependencies" section
3232
```groovy
3333
dependencies {
@@ -38,7 +38,7 @@ dependencies {
3838
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
3939
if you want to have Amazon Fling SDK support.
4040

41-
##Including Connect SDK in your app with Android Studio from sources
41+
## Including Connect SDK in your app with Android Studio from sources
4242
1. Open your terminal and execute these commands
4343
```
4444
cd your_project_folder
@@ -64,7 +64,7 @@ if you want to have Amazon Fling SDK support.
6464
5. Sync project with gradle files
6565
6. Add permissions to your manifest
6666
67-
###Permissions to include in manifest
67+
### Permissions to include in manifest
6868
* Required for SSDP & Chromecast/Zeroconf discovery
6969
- `android.permission.INTERNET`
7070
- `android.permission.CHANGE_WIFI_MULTICAST_STATE`
@@ -82,7 +82,7 @@ if you want to have Amazon Fling SDK support.
8282
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
8383
```
8484

85-
###Metadata for application tag
85+
### Metadata for application tag
8686
This metadata tag is necessary to enable Chromecast support.
8787

8888
```xml
@@ -96,14 +96,14 @@ This metadata tag is necessary to enable Chromecast support.
9696
</application>
9797
```
9898

99-
###Proguard configuration
99+
### Proguard configuration
100100
Add the following line to your proguard configuration file (otherwise `DiscoveryManager` won't be able to set any `DiscoveryProvider`).
101101

102102
```
103103
-keep class com.connectsdk.** { * ; }
104104
```
105105

106-
###Tests
106+
### Tests
107107
Connect SDK has unit tests for some parts of the code, and we are continuing to increase the test coverage.
108108
These tests are based on third party libraries such as Robolectric, Mockito and PowerMock. You can easily run these tests with Gradle:
109109
```
@@ -115,9 +115,9 @@ gradle jacocoTestReport
115115
```
116116
The test coverage report will be in this folder `Connect-SDK-Android/build/reports/jacoco/jacocoTestReport/html`.
117117

118-
##Limitations/Caveats
118+
## Limitations/Caveats
119119

120-
###Subtitles
120+
### Subtitles
121121

122122
- 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.
123123
- 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
127127

128128

129129

130-
##Contact
130+
## Contact
131131
* Twitter [@ConnectSDK](https://www.twitter.com/ConnectSDK)
132132
* 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))
133133
* General Inquiries [email protected]
134134
* Developer Support [email protected]
135135
* Partnerships [email protected]
136136

137-
##Credits
137+
## Credits
138138
Connect SDK for Android makes use of the following projects, some of which are open-source.
139139

140140
* [Amazon Fling SDK](https://developer.amazon.com/fling)
@@ -152,7 +152,7 @@ These projects are used in tests:
152152
* [PowerMock](https://github.com/jayway/powermock) (Apache License, Version 2.0)
153153
* [XMLUnit](http://www.xmlunit.org/) (Apache License, Version 2.0)
154154

155-
##License
155+
## License
156156
Copyright (c) 2013-2015 LG Electronics.
157157

158158
Licensed under the Apache License, Version 2.0 (the "License");

build.gradle

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
buildscript {
22
repositories {
33
google()
4-
jcenter()
4+
mavenCentral()
55
}
66
dependencies {
77
classpath 'com.android.tools.build:gradle:4.0.1'
@@ -12,7 +12,7 @@ buildscript {
1212
allprojects {
1313
repositories {
1414
google()
15-
jcenter()
15+
mavenCentral()
1616
maven { url "https://jitpack.io" }
1717
}
1818
}
@@ -55,9 +55,14 @@ task jacocoTestReport(type:JacocoReport, dependsOn: "check") {
5555
build.dependsOn jacocoTestReport
5656

5757
android {
58-
compileSdkVersion 31
58+
compileSdkVersion 32
5959
buildToolsVersion '30.0.3'
6060

61+
defaultConfig {
62+
minSdkVersion 24
63+
targetSdkVersion 32
64+
}
65+
6166
packagingOptions {
6267
exclude 'LICENSE.txt'
6368
exclude 'META-INF/LICENSE'
@@ -77,8 +82,9 @@ android {
7782
resources.srcDirs = ['src']
7883
aidl.srcDirs = ['src']
7984
renderscript.srcDirs = ['src']
80-
res.srcDirs = ['res']
85+
res.srcDirs = ['core/res']
8186
assets.srcDirs = ['assets']
87+
jniLibs.srcDirs = ['core/jniLibs']
8288
}
8389
test {
8490
java.srcDirs = [
@@ -114,21 +120,21 @@ android.testOptions.unitTests.all {
114120
}
115121

116122
dependencies {
117-
implementation files('core/libs/Java-WebSocket-1.3.7.jar')
118-
implementation files('core/libs/javax.jmdns_3.4.1-patch2.jar')
119-
compileOnly files('core/libs/lgcast-sdk-2.1.2.aar')
123+
implementation 'org.java-websocket:Java-WebSocket:1.5.0'
124+
implementation 'javax.jmdns:jmdns:3.4.1'
120125

121126
implementation fileTree(dir: 'modules/firetv/libs', include: '*.jar')
122127

123128

124-
implementation "androidx.mediarouter:mediarouter:1.2.0"
125-
implementation "androidx.annotation:annotation:1.0.0"
129+
implementation 'androidx.mediarouter:mediarouter:1.2.0'
130+
implementation 'androidx.annotation:annotation:1.0.0'
126131
implementation 'androidx.preference:preference:1.1.1'
127-
implementation 'androidx.appcompat:appcompat:1.4.0'
132+
implementation 'androidx.appcompat:appcompat:1.3.1' // 1.4.1 version doesn't support compile sdk 30
128133
implementation 'com.googlecode.plist:dd-plist:1.23'
129-
implementation 'com.nimbusds:srp6a-android:2.0.2'
130-
implementation 'net.i2p.crypto:eddsa:0.2.0'
134+
implementation 'com.nimbusds:srp6a:2.1.0'
135+
implementation 'net.i2p.crypto:eddsa:0.3.0'
131136
implementation 'com.google.android.gms:play-services-cast-framework:9.4.0'
137+
implementation files('core/libs/lgcast-android-lib.jar')
132138

133139
testImplementation 'org.apache.maven:maven-ant-tasks:2.1.3'
134140
testImplementation 'junit:junit:4.12'

core

Submodule core updated 161 files

res/values/connect_sdk_strings.xml

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)