Skip to content

Commit cc64e2d

Browse files
authored
Add files via upload
1 parent b96d77f commit cc64e2d

File tree

17 files changed

+1714
-1961
lines changed

17 files changed

+1714
-1961
lines changed

app/build.gradle

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
apply plugin: 'com.android.application'
2-
3-
android {
4-
compileSdkVersion 33
5-
buildToolsVersion "29.0.2"
6-
useLibrary 'org.apache.http.legacy'
7-
8-
defaultConfig {
9-
applicationId "com.app.livesubtitle"
10-
minSdkVersion 23
11-
targetSdkVersion 33
12-
versionCode 1
13-
versionName "1.0.1"
14-
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
15-
}
16-
buildTypes {
17-
release {
18-
minifyEnabled false
19-
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
20-
}
21-
}
22-
compileOptions {
23-
sourceCompatibility JavaVersion.VERSION_1_8
24-
targetCompatibility JavaVersion.VERSION_1_8
25-
}
26-
}
27-
28-
dependencies {
29-
implementation fileTree(dir: 'libs', include: ['*.jar'])
30-
implementation 'androidx.appcompat:appcompat:1.1.0'
31-
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
32-
implementation 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
33-
implementation 'org.jetbrains:annotations:15.0'
34-
testImplementation 'junit:junit:4.12'
35-
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
36-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
37-
}
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 30
5+
defaultConfig {
6+
applicationId "com.app.livesubtitle"
7+
minSdkVersion 23
8+
targetSdkVersion 30
9+
versionCode 1
10+
versionName "1.0"
11+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
12+
}
13+
buildTypes {
14+
release {
15+
minifyEnabled false
16+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17+
}
18+
}
19+
compileOptions {
20+
sourceCompatibility JavaVersion.VERSION_1_8
21+
targetCompatibility JavaVersion.VERSION_1_8
22+
}
23+
}
24+
25+
dependencies {
26+
implementation fileTree(dir: 'libs', include: ['*.jar'])
27+
implementation 'androidx.appcompat:appcompat:1.1.0'
28+
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
29+
implementation 'com.google.mlkit:translate:17.0.1'
30+
implementation 'com.google.android.gms:play-services-mlkit-language-id:17.0.0'
31+
//implementation 'com.google.android.gms:play-services-mlkit-language-id:16.0.0-beta2'
32+
//implementation 'com.google.mlkit:translate:16.1.2'
33+
implementation 'org.jetbrains:annotations:15.0'
34+
testImplementation 'junit:junit:4.12'
35+
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
36+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
37+
}

app/proguard-rules.pro

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
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.
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.
2121
#-renamesourcefileattribute SourceFile
Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
package com.app.livesubtitle;
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 <a href="http://d.android.com/tools/testing">Testing documentation</a>
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.app.livesubtitle", appContext.getPackageName());
25-
}
1+
package com.app.livesubtitle;
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 <a href="http://d.android.com/tools/testing">Testing documentation</a>
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.app.livesubtitle", appContext.getPackageName());
25+
}
2626
}

app/src/main/AndroidManifest.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@
3535
android:enabled="true"
3636
android:exported="false"
3737
android:permission="TODO" />
38+
39+
<meta-data
40+
android:name="com.google.mlkit.vision.DEPENDENCIES"
41+
android:value="langid,model2,model3" />
42+
3843
<activity
3944
android:name=".MainActivity"
4045
android:configChanges="keyboardHidden|screenSize|orientation|screenLayout|navigation"
@@ -44,9 +49,6 @@
4449
<category android:name="android.intent.category.LAUNCHER" />
4550
</intent-filter>
4651
</activity>
47-
<uses-library
48-
android:name="org.apache.http.legacy"
49-
android:required="false"/>
5052
</application>
5153
<queries>
5254
<intent>

0 commit comments

Comments
 (0)