Commit ed7e6721 by zhengnw@sobot.com

widget 1.0.4

parent 5df18524
......@@ -13,7 +13,7 @@ ext {
PUBLISH_GROUP_ID = "com.sobot.library" //项目包名
PUBLISH_ARTIFACT_ID = 'widget' //项目名
// PUBLISH_ARTIFACT_ID = 'widget_x' //项目名
PUBLISH_VERSION = '1.0.3' //版本号
PUBLISH_VERSION = '1.0.4' //版本号
}
......
......@@ -811,4 +811,39 @@ public abstract class SobotBaseActivity extends FragmentActivity {
}
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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment