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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
4 deletions
+25
-4
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
+24
-3
No files found.
sobot_widget/sobot-widget-publish-mavencentral.gradle
View file @
a2d680e3
...
@@ -13,7 +13,7 @@ ext {
...
@@ -13,7 +13,7 @@ ext {
PUBLISH_GROUP_ID
=
"com.sobot.library"
//项目包名
PUBLISH_GROUP_ID
=
"com.sobot.library"
//项目包名
PUBLISH_ARTIFACT_ID
=
'widget'
//项目名
PUBLISH_ARTIFACT_ID
=
'widget'
//项目名
// PUBLISH_ARTIFACT_ID = 'widget_x' //项目名
// 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,7 +55,18 @@ public class SobotWidgetUtils {
...
@@ -55,7 +55,18 @@ public class SobotWidgetUtils {
act
.
startActivityForResult
(
intent
,
SobotBaseConstant
.
REQUEST_CODE_PICTURE
);
act
.
startActivityForResult
(
intent
,
SobotBaseConstant
.
REQUEST_CODE_PICTURE
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
SobotToastUtil
.
showToast
(
act
.
getApplicationContext
(),
SobotResourceUtils
.
getResString
(
act
,
"sobot_not_open_album"
));
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"
));
}
}
}
}
}
...
@@ -92,8 +103,18 @@ public class SobotWidgetUtils {
...
@@ -92,8 +103,18 @@ public class SobotWidgetUtils {
act
.
startActivityForResult
(
intent
,
SobotBaseConstant
.
REQUEST_CODE_VIDEO
);
act
.
startActivityForResult
(
intent
,
SobotBaseConstant
.
REQUEST_CODE_VIDEO
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
intent
=
new
Intent
(
Intent
.
ACTION_GET_CONTENT
);
SobotToastUtil
.
showToast
(
act
.
getApplicationContext
(),
SobotResourceUtils
.
getResString
(
act
,
"sobot_not_open_album"
));
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