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
ed7e6721
Commit
ed7e6721
authored
Apr 24, 2023
by
zhengnw@sobot.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widget 1.0.4
parent
5df18524
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
1 deletion
+37
-1
sobot-widget-publish-mavencentral.gradle
sobot_widget/sobot-widget-publish-mavencentral.gradle
+1
-1
SobotBaseActivity.java
...main/java/com/sobot/widget/ui/base/SobotBaseActivity.java
+36
-0
No files found.
sobot_widget/sobot-widget-publish-mavencentral.gradle
View file @
ed7e6721
...
@@ -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.
3
'
//版本号
PUBLISH_VERSION
=
'1.0.
4
'
//版本号
}
}
...
...
sobot_widget/src/main/java/com/sobot/widget/ui/base/SobotBaseActivity.java
View file @
ed7e6721
...
@@ -811,4 +811,39 @@ public abstract class SobotBaseActivity extends FragmentActivity {
...
@@ -811,4 +811,39 @@ public abstract class SobotBaseActivity extends FragmentActivity {
}
}
SobotWidgetUtils
.
openSelectVedio
(
getSobotBaseActivity
());
SobotWidgetUtils
.
openSelectVedio
(
getSobotBaseActivity
());
}
}
/**
* 打开相机
*/
public
void
openCamera
()
{
openCamera
(
""
,
""
);
}
/**
* 打开相机
*
* @param title 权限用途提示弹窗开启后,弹窗的的标题
* @param content 权限用途提示弹窗开启后,弹窗的内容
*/
public
void
openCamera
(
String
title
,
String
content
)
{
cameraFile
=
null
;
permissionListener
=
null
;
permissionListener
=
new
SobotPermissionListenerImpl
()
{
@Override
public
void
onPermissionSuccessListener
()
{
if
(
isCameraCanUse
())
{
cameraFile
=
SobotWidgetUtils
.
openCamera
(
getSobotBaseActivity
());
}
}
};
if
(
checkIsShowPermissionPop
(
TextUtils
.
isEmpty
(
title
)
?
getResources
().
getString
(
R
.
string
.
sobot_camera
)
:
title
,
TextUtils
.
isEmpty
(
content
)
?
getResources
().
getString
(
R
.
string
.
sobot_camera_yongtu
)
:
content
,
3
,
4
))
{
return
;
}
if
(!
checkCameraPermission
())
{
return
;
}
if
(
isCameraCanUse
())
{
cameraFile
=
SobotWidgetUtils
.
openCamera
(
getSobotBaseActivity
());
}
}
}
}
\ No newline at end of file
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