Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
Sobot_module_Dev
Project
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
sobot_android
Sobot_module_Dev
Commits
a2d680e3
Commit
a2d680e3
authored
May 24, 2023
by
zhengnw@sobot.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widget 1.0.6,解决部分手机(oppo)选择不了图片、视频的问题
parent
ff56e56c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
sobot-widget-publish-mavencentral.gradle
sobot_widget/sobot-widget-publish-mavencentral.gradle
+1
-1
SobotWidgetUtils.java
...main/java/com/sobot/widget/ui/utils/SobotWidgetUtils.java
+22
-1
No files found.
sobot_widget/sobot-widget-publish-mavencentral.gradle
View file @
a2d680e3
...
...
@@ -13,7 +13,7 @@ ext {
PUBLISH_GROUP_ID
=
"com.sobot.library"
//项目包名
PUBLISH_ARTIFACT_ID
=
'widget'
//项目名
// PUBLISH_ARTIFACT_ID = 'widget_x' //项目名
PUBLISH_VERSION
=
'1.0.
5
'
//版本号
PUBLISH_VERSION
=
'1.0.
6
'
//版本号
}
...
...
sobot_widget/src/main/java/com/sobot/widget/ui/utils/SobotWidgetUtils.java
View file @
a2d680e3
...
...
@@ -55,9 +55,20 @@ public class SobotWidgetUtils {
act
.
startActivityForResult
(
intent
,
SobotBaseConstant
.
REQUEST_CODE_PICTURE
);
}
}
catch
(
Exception
e
)
{
intent
=
new
Intent
(
Intent
.
ACTION_GET_CONTENT
);
intent
.
setType
(
"image/*"
);
try
{
if
(
childFragment
!=
null
)
{
childFragment
.
startActivityForResult
(
intent
,
SobotBaseConstant
.
REQUEST_CODE_PICTURE
);
}
else
{
act
.
startActivityForResult
(
intent
,
SobotBaseConstant
.
REQUEST_CODE_PICTURE
);
}
}
catch
(
Exception
exception
)
{
exception
.
printStackTrace
();
SobotToastUtil
.
showToast
(
act
.
getApplicationContext
(),
SobotResourceUtils
.
getResString
(
act
,
"sobot_not_open_album"
));
}
}
}
/**
* activity打开选择视频界面
...
...
@@ -92,10 +103,20 @@ public class SobotWidgetUtils {
act
.
startActivityForResult
(
intent
,
SobotBaseConstant
.
REQUEST_CODE_VIDEO
);
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
intent
=
new
Intent
(
Intent
.
ACTION_GET_CONTENT
);
intent
.
setType
(
"video/*"
);
try
{
if
(
childFragment
!=
null
)
{
childFragment
.
startActivityForResult
(
intent
,
SobotBaseConstant
.
REQUEST_CODE_VIDEO
);
}
else
{
act
.
startActivityForResult
(
intent
,
SobotBaseConstant
.
REQUEST_CODE_VIDEO
);
}
}
catch
(
Exception
exception
)
{
exception
.
printStackTrace
();
SobotToastUtil
.
showToast
(
act
.
getApplicationContext
(),
SobotResourceUtils
.
getResString
(
act
,
"sobot_not_open_album"
));
}
}
}
/**
...
...
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