mirror of
https://github.com/RxReader/tencent_kit.git
synced 2025-06-20 10:42:18 +08:00
Android & flutter
This commit is contained in:
@ -22,7 +22,9 @@ rootProject.allprojects {
|
||||
apply plugin: 'com.android.library'
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
compileSdkVersion 31
|
||||
|
||||
// useLibrary 'org.apache.http.legacy'
|
||||
|
||||
resourcePrefix 'tencent_kit'
|
||||
|
||||
|
BIN
android/libs/open_sdk_3.5.10.3_r593ae92_lite.jar
Normal file
BIN
android/libs/open_sdk_3.5.10.3_r593ae92_lite.jar
Normal file
Binary file not shown.
Binary file not shown.
@ -183,6 +183,15 @@ public class TencentKitPlugin implements FlutterPlugin, ActivityAware, ActivityR
|
||||
tencent = Tencent.createInstance(appId, applicationContext);
|
||||
}
|
||||
result.success(null);
|
||||
} else if ("setIsPermissionGranted".equals(call.method)) {
|
||||
final boolean granted = call.argument("granted");
|
||||
final String buildModel = call.argument("build_model");
|
||||
if (!TextUtils.isEmpty(buildModel)) {
|
||||
Tencent.setIsPermissionGranted(granted, buildModel);
|
||||
} else {
|
||||
Tencent.setIsPermissionGranted(granted);
|
||||
}
|
||||
result.success(null);
|
||||
} else if (METHOD_ISQQINSTALLED.equals(call.method)) {
|
||||
result.success(isAppInstalled(applicationContext, "com.tencent.mobileqq"));
|
||||
} else if (METHOD_ISTIMINSTALLED.equals(call.method)) {
|
||||
|
2
android/src/vendor/AndroidManifest.xml
vendored
2
android/src/vendor/AndroidManifest.xml
vendored
@ -39,7 +39,7 @@
|
||||
|
||||
<activity
|
||||
android:name="com.tencent.connect.common.AssistActivity"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:configChanges="orientation|keyboardHidden"
|
||||
android:screenOrientation="behind"
|
||||
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
|
||||
</application>
|
||||
|
@ -25,7 +25,7 @@ apply plugin: 'com.android.application'
|
||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
android {
|
||||
compileSdkVersion 28
|
||||
compileSdkVersion flutter.compileSdkVersion
|
||||
|
||||
lintOptions {
|
||||
disable 'InvalidPackage'
|
||||
@ -34,8 +34,8 @@ android {
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "io.github.v7lin.tencent_kit_example"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 28
|
||||
minSdkVersion flutter.minSdkVersion
|
||||
targetSdkVersion flutter.targetSdkVersion
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
|
||||
|
@ -14,7 +14,7 @@ packages:
|
||||
name: analyzer
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.7.1"
|
||||
version: "1.7.2"
|
||||
archive:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -35,7 +35,7 @@ packages:
|
||||
name: async
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.6.1"
|
||||
version: "2.8.2"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -105,14 +105,14 @@ packages:
|
||||
name: characters
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
version: "1.2.0"
|
||||
charcode:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: charcode
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
version: "1.3.1"
|
||||
checked_yaml:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -304,14 +304,14 @@ packages:
|
||||
name: matcher
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.12.10"
|
||||
version: "0.12.11"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
version: "1.7.0"
|
||||
mime:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -533,7 +533,7 @@ packages:
|
||||
name: test_api
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.3.0"
|
||||
version: "0.4.3"
|
||||
timing:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -561,7 +561,7 @@ packages:
|
||||
name: vector_math
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
version: "2.1.1"
|
||||
watcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -605,5 +605,5 @@ packages:
|
||||
source: hosted
|
||||
version: "3.1.0"
|
||||
sdks:
|
||||
dart: ">=2.12.0 <3.0.0"
|
||||
dart: ">=2.14.0 <3.0.0"
|
||||
flutter: ">=1.24.0-10"
|
||||
|
@ -78,6 +78,20 @@ class Tencent {
|
||||
);
|
||||
}
|
||||
|
||||
/// 设置是否已授权获取设备信息
|
||||
Future<void> setIsPermissionGranted({
|
||||
required bool granted,
|
||||
String? buildModel,
|
||||
}) {
|
||||
return _channel.invokeMethod(
|
||||
'setIsPermissionGranted',
|
||||
<String, dynamic>{
|
||||
'granted': granted,
|
||||
if (buildModel?.isNotEmpty ?? false) 'build_model': buildModel,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
///
|
||||
Stream<BaseResp> respStream() {
|
||||
return _respStreamController.stream;
|
||||
|
16
pubspec.lock
16
pubspec.lock
@ -28,7 +28,7 @@ packages:
|
||||
name: async
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.6.1"
|
||||
version: "2.8.2"
|
||||
boolean_selector:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -98,14 +98,14 @@ packages:
|
||||
name: characters
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.1.0"
|
||||
version: "1.2.0"
|
||||
charcode:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: charcode
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
version: "1.3.1"
|
||||
checked_yaml:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -262,14 +262,14 @@ packages:
|
||||
name: matcher
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.12.10"
|
||||
version: "0.12.11"
|
||||
meta:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: meta
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
version: "1.7.0"
|
||||
mime:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -393,7 +393,7 @@ packages:
|
||||
name: test_api
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.3.0"
|
||||
version: "0.4.3"
|
||||
timing:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -414,7 +414,7 @@ packages:
|
||||
name: vector_math
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
version: "2.1.1"
|
||||
watcher:
|
||||
dependency: transitive
|
||||
description:
|
||||
@ -437,5 +437,5 @@ packages:
|
||||
source: hosted
|
||||
version: "3.1.0"
|
||||
sdks:
|
||||
dart: ">=2.12.0 <3.0.0"
|
||||
dart: ">=2.14.0 <3.0.0"
|
||||
flutter: ">=1.20.0"
|
||||
|
Reference in New Issue
Block a user