Skip to content

Commit

Permalink
升级 Android SDK & 适配 Android Q 本地分享(targetSdkVersion >= 29,且不豁免外部存储沙箱限制)
Browse files Browse the repository at this point in the history
  • Loading branch information
droplet-js committed Dec 5, 2019
1 parent 9a33b35 commit b65b2be
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 1.0.3 - 2019.12.05

* 升级 Android SDK
* 适配 Android Q 本地分享(targetSdkVersion >= 29,且不豁免外部存储沙箱限制)

## 1.0.2 - 2019.12.02

* 优化
Expand Down
4 changes: 3 additions & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group 'io.github.v7lin.tencent_kit'
version '1.0.2'
version '1.0.3'

buildscript {
repositories {
Expand All @@ -25,6 +25,8 @@ apply from: './quality.gradle'
android {
compileSdkVersion 28

resourcePrefix 'tencent_kit'

defaultConfig {
minSdkVersion 16

Expand Down
Binary file not shown.
16 changes: 15 additions & 1 deletion android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<!--<uses-permission android:name="android.permission.WRITE_APN_SETTINGS"/>-->

<!-- 不建议使用 android:requestLegacyExternalStorage="true" 豁免 Android Q 的外部存储沙箱限制 -->
<application android:usesCleartextTraffic="true">
<uses-library
android:name="org.apache.http.legacy"
Expand All @@ -27,8 +28,21 @@

<activity
android:name="com.tencent.connect.common.AssistActivity"
android:configChanges="orientation|keyboardHidden"
android:configChanges="orientation|keyboardHidden|screenSize"
android:screenOrientation="behind"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />

<!-- Android Q 的外部存储沙箱限制 -->
<!-- 腾讯有毒吧,文档都不写 -->
<provider
android:name=".content.TencentKitFileProvider"
android:authorities="com.tencent.tauth.fileprovider"
android:exported="false"
android:grantUriPermissions="true">

<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/tencent_kit_file_paths" />
</provider>
</application>
</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package io.github.v7lin.tencent_kit.content;

import androidx.core.content.FileProvider;

public final class TencentKitFileProvider extends FileProvider {
}
11 changes: 11 additions & 0 deletions android/src/main/res/xml/tencent_kit_file_paths.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<!--suppress AndroidDomInspection -->
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<root-path name="root" path="" />
<files-path name="files" path="" />
<cache-path name="cache" path="" />
<external-path name="external" path="" />
<external-files-path name="external_files" path="" />
<external-cache-path name="external_cache" path="" />
<external-media-path name="external_media" path="" />
</paths>
2 changes: 1 addition & 1 deletion ios/tencent_kit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
Pod::Spec.new do |s|
s.name = 'tencent_kit'
s.version = '1.0.2'
s.version = '1.0.3'
s.summary = 'A powerful Flutter plugin allowing developers to share with natvie android & iOS Tencent SDKs.'
s.description = <<-DESC
A powerful Flutter plugin allowing developers to share with natvie android & iOS Tencent SDKs.
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: tencent_kit
description: A powerful Flutter plugin allowing developers to share or authorize with natvie android & iOS Tencent SDKs.
version: 1.0.2
version: 1.0.3
author: v7lin <v7lin@qq.com>
homepage: https://github.com/v7lin/fake_tencent

Expand Down

0 comments on commit b65b2be

Please sign in to comment.