Skip to content

Commit d6a7d13

Browse files
authored
Merge pull request #8 from Jeremiahandsome/main
Configure minSdkVersion in the build.gradle file, supplement chat uikit related code
2 parents e4cfe84 + 7113c32 commit d6a7d13

23 files changed

Lines changed: 444 additions & 48 deletions

application/android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ android {
2424
applicationId = "com.trtc.uikit.livekit.example"
2525
// You can update the following values to match your application needs.
2626
// For more information, see: https://flutter.dev/to/review-gradle-config.
27-
minSdkVersion = flutter.minSdkVersion
27+
minSdkVersion = 23
2828
targetSdk = flutter.targetSdkVersion
2929
versionCode = flutter.versionCode
3030
versionName = flutter.versionName

chat/demo/.gitignore

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.build/
9+
.buildlog/
10+
.history
11+
.svn/
12+
.swiftpm/
13+
migrate_working_dir/
14+
15+
# IntelliJ related
16+
*.iml
17+
*.ipr
18+
*.iws
19+
.idea/
20+
21+
# The .vscode folder contains launch configuration and tasks you configure in
22+
# VS Code which you may wish to be included in version control, so this line
23+
# is commented out by default.
24+
#.vscode/
25+
26+
# Flutter/Dart/Pub related
27+
**/doc/api/
28+
**/ios/Flutter/.last_build_id
29+
.dart_tool/
30+
.flutter-plugins
31+
.flutter-plugins-dependencies
32+
.packages
33+
.pub-cache/
34+
.pub/
35+
build/
36+
37+
# Symbolication related
38+
app.*.symbols
39+
40+
# Obfuscation related
41+
app.*.map.json
42+
43+
# Android Studio will place build artifacts here
44+
/android/app/debug
45+
/android/app/profile
46+
/android/app/release
47+
48+
*.cxx/
49+
pubspec.lock
50+
ios/Podfile.lock
51+
52+
.metadata

chat/demo/android/app/build.gradle

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ plugins {
55
id "dev.flutter.flutter-gradle-plugin"
66
}
77

8+
apply plugin: 'com.google.gms.google-services'
9+
apply plugin: 'com.hihonor.mcs.asplugin'
10+
apply plugin: 'com.huawei.agconnect'
11+
812
android {
913
namespace = "com.tencent.uikit_next"
1014
compileSdk = flutter.compileSdkVersion
@@ -21,7 +25,7 @@ android {
2125

2226
defaultConfig {
2327
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
24-
applicationId = "com.tencent.uikit_next"
28+
applicationId = "com.tencent.qcloud.tim.tuikit"
2529
// You can update the following values to match your application needs.
2630
// For more information, see: https://flutter.dev/to/review-gradle-config.
2731
minSdk = 24
@@ -42,3 +46,13 @@ android {
4246
flutter {
4347
source = "../.."
4448
}
49+
50+
dependencies {
51+
implementation 'com.tencent.timpush:huawei:8.7.7201'
52+
implementation 'com.tencent.timpush:xiaomi:8.7.7201'
53+
implementation 'com.tencent.timpush:oppo:8.7.7201'
54+
implementation 'com.tencent.timpush:vivo:8.7.7201'
55+
implementation 'com.tencent.timpush:honor:8.7.7201'
56+
implementation 'com.tencent.timpush:meizu:8.7.7201'
57+
implementation 'com.tencent.timpush:fcm:8.7.7201'
58+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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
22+
23+
-keep class com.tencent.** { *; }

chat/demo/android/app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
22
<application
3+
android:name="com.tencent.uikit_next.MyApplication"
34
android:label="uikit_next"
4-
android:name="${applicationName}"
55
android:icon="@mipmap/ic_launcher">
66
<activity
77
android:name=".MainActivity"
@@ -10,6 +10,7 @@
1010
android:theme="@style/LaunchTheme"
1111
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
1212
android:hardwareAccelerated="true"
13+
android:supportsPictureInPicture="true"
1314
android:windowSoftInputMode="adjustResize">
1415
<!-- Specifies an Android theme to apply to this Activity as soon as
1516
the Android process has started. This theme is visible to the user
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package com.tencent.uikit_next
22

3-
import io.flutter.embedding.android.FlutterActivity
3+
import com.tencent.chat.flutter.push.tencent_cloud_chat_push.activity.TencentCloudChatPushActivity
44

5-
class MainActivity: FlutterActivity()
5+
class MainActivity: TencentCloudChatPushActivity()
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package com.tencent.uikit_next
2+
3+
import com.tencent.chat.flutter.push.tencent_cloud_chat_push.application.TencentCloudChatPushApplication
4+
5+
6+
class MyApplication: TencentCloudChatPushApplication() {
7+
}

chat/demo/android/build.gradle

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,29 @@
1+
buildscript {
2+
ext.kotlin_version = '2.0.20'
3+
repositories {
4+
google()
5+
mavenCentral()
6+
maven { url "https://mirrors.tencent.com/nexus/repository/maven-public/" }
7+
maven { url 'https://developer.huawei.com/repo/' }
8+
maven { url 'https://developer.hihonor.com/repo' }
9+
}
10+
11+
dependencies {
12+
classpath 'com.android.tools.build:gradle:7.3.1'
13+
classpath 'com.huawei.agconnect:agcp:1.9.1.300'
14+
classpath 'com.hihonor.mcs:asplugin:2.0.1.300'
15+
classpath 'com.google.gms:google-services:4.3.15'
16+
17+
}
18+
}
19+
120
allprojects {
221
repositories {
322
google()
423
mavenCentral()
24+
maven { url "https://mirrors.tencent.com/nexus/repository/maven-public/" }
25+
maven {url 'https://developer.huawei.com/repo/'}
26+
maven {url 'https://developer.hihonor.com/repo'}
527
}
628
}
729

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError
22
android.useAndroidX=true
33
android.enableJetifier=true
4+
apmsInstrumentationEnabled=false

chat/demo/android/settings.gradle

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ pluginManagement {
1414
google()
1515
mavenCentral()
1616
gradlePluginPortal()
17+
maven { url "https://mirrors.tencent.com/nexus/repository/maven-public/" }
18+
// Configure the Maven repository address of the HMS Core SDK.
19+
maven {url 'https://developer.huawei.com/repo/'}
20+
maven {url 'https://developer.hihonor.com/repo'}
1721
}
1822
}
1923

@@ -23,4 +27,15 @@ plugins {
2327
id "org.jetbrains.kotlin.android" version "2.0.20" apply false
2428
}
2529

30+
dependencyResolutionManagement {
31+
repositories {
32+
mavenCentral()
33+
maven { url "https://mirrors.tencent.com/nexus/repository/maven-public/" }
34+
// Configure the Maven repository address of the HMS Core SDK.
35+
maven {url 'https://developer.huawei.com/repo/'}
36+
maven {url 'https://developer.hihonor.com/repo'}
37+
}
38+
}
39+
40+
2641
include ':app'

0 commit comments

Comments
 (0)