Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YDL-Component-Medical
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨凯
YDL-Component-Medical
Commits
257a75dc
Commit
257a75dc
authored
Jun 18, 2021
by
霍志良
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixbug:动态获取applicationid解决心理咨询马甲包版本更新问题
parent
1ccf8a24
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
config.gradle
config.gradle
+2
-2
ApkInstallTool.kt
ydl-platform/src/main/java/com/ydl/ydlcommon/utils/ApkInstallTool.kt
+1
-1
No files found.
config.gradle
View file @
257a75dc
...
@@ -33,7 +33,7 @@ ext {
...
@@ -33,7 +33,7 @@ ext {
//-------------- 功能组件 --------------
//-------------- 功能组件 --------------
//第一步
//第一步
"ydl-platform"
:
"0.0.40.
09
"
,
"ydl-platform"
:
"0.0.40.
14
"
,
//第二步 若干
//第二步 若干
"ydl-webview"
:
"0.0.38.46"
,
"ydl-webview"
:
"0.0.38.46"
,
...
@@ -115,7 +115,7 @@ ext {
...
@@ -115,7 +115,7 @@ ext {
//-------------- 功能组件 --------------
//-------------- 功能组件 --------------
//第一步
//第一步
"ydl-platform"
:
"0.0.40.
09
"
,
"ydl-platform"
:
"0.0.40.
14
"
,
//第二步 若干
//第二步 若干
"ydl-webview"
:
"0.0.38.46"
,
"ydl-webview"
:
"0.0.38.46"
,
...
...
ydl-platform/src/main/java/com/ydl/ydlcommon/utils/ApkInstallTool.kt
View file @
257a75dc
...
@@ -101,7 +101,7 @@ class ApkInstallTool {
...
@@ -101,7 +101,7 @@ class ApkInstallTool {
intent
.
flags
=
Intent
.
FLAG_ACTIVITY_NEW_TASK
intent
.
flags
=
Intent
.
FLAG_ACTIVITY_NEW_TASK
if
(
Build
.
VERSION
.
SDK_INT
>=
24
)
{
//判读版本是否在7.0以上
if
(
Build
.
VERSION
.
SDK_INT
>=
24
)
{
//判读版本是否在7.0以上
//参数1 上下文, 参数2 Provider主机地址 和配置文件中保持一致 参数3 共享的文件
//参数1 上下文, 参数2 Provider主机地址 和配置文件中保持一致 参数3 共享的文件
val
apkUri
=
FileProvider
.
getUriForFile
(
context
!!
,
"com.cxzapp.yidianling.fileprovider"
,
file
)
val
apkUri
=
context
?.
let
{
FileProvider
.
getUriForFile
(
it
,
"${it.applicationContext.packageName}.fileprovider"
,
file
)
}
//添加这一句表示对目标应用临时授权该Uri所代表的文件
//添加这一句表示对目标应用临时授权该Uri所代表的文件
intent
.
addFlags
(
Intent
.
FLAG_GRANT_READ_URI_PERMISSION
)
intent
.
addFlags
(
Intent
.
FLAG_GRANT_READ_URI_PERMISSION
)
intent
.
setDataAndType
(
apkUri
,
"application/vnd.android.package-archive"
)
intent
.
setDataAndType
(
apkUri
,
"application/vnd.android.package-archive"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment