Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
android
/
dayu
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6fa1806d
authored
Jul 20, 2018
by
罗翻
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改人脸识别存储图片的兼容性
parent
b7cd4360
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
23 deletions
IDCardLib/src/main/java/com/megvii/idcardlib/util/ConUtil.java
baseSDK/src/main/java/com/dayu/common/Constants.java
IDCardLib/src/main/java/com/megvii/idcardlib/util/ConUtil.java
View file @
6fa1806d
...
...
@@ -91,22 +91,36 @@ public class ConUtil {
// File mediaStorageDir = mContext.getExternalFilesDir(Constant.cacheImage);
String
jpgFileName
=
System
.
currentTimeMillis
()
+
""
+
new
Random
().
nextInt
(
1000000
)
+
"_"
+
key
+
".jpg"
;
File
file
=
new
File
(
Environment
.
getExternalStorageDirectory
()
+
"/dayu/"
,
jpgFileName
);
// if (!mediaStorageDir.exists()) {
// if (!mediaStorageDir.mkdirs()) {
// return null;
// }
// }
boolean
sdCardExist
=
Environment
.
getExternalStorageState
()
.
equals
(
android
.
os
.
Environment
.
MEDIA_MOUNTED
);
//判断sd卡是否存在
File
file
;
if
(
sdCardExist
)
{
file
=
new
File
(
Environment
.
getExternalStorageDirectory
()
+
"/dayu/"
);
if
(!
file
.
exists
())
{
file
.
mkdirs
();
}
file
=
new
File
(
file
,
jpgFileName
);
}
else
{
file
=
new
File
(
mContext
.
getCacheDir
()
+
"/dayu/"
);
if
(!
file
.
exists
())
{
file
.
mkdirs
();
}
file
=
new
File
(
file
,
jpgFileName
);
}
BufferedOutputStream
bos
=
null
;
FileOutputStream
fos
=
null
;
try
{
fos
=
new
FileOutputStream
(
file
.
getAbsolutePath
());
bos
=
new
BufferedOutputStream
(
fos
);
bos
.
write
(
data
);
return
file
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
...
...
baseSDK/src/main/java/com/dayu/common/Constants.java
View file @
6fa1806d
...
...
@@ -12,16 +12,16 @@ public class Constants {
/**
* 测试环境配置.
*/
public
static
final
int
LOG_LEVEL
=
LogUtils
.
LEVEL_ALL
;
public
static
final
String
ENVIROMENT
=
"debug"
;
public
static
final
String
BASE_URL
=
"http://47.94.101.239:3112"
;
public
final
static
String
UP_PHOTO
=
"/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply"
;
public
final
static
String
WEB_SOP
=
"http://47.94.101.239:9004/#/sop"
;
public
final
static
String
CHECK_MULTI_WEB_SOP
=
"http://47.94.101.239:9004/#/manyServiceResult"
;
public
final
static
String
MULTI_WEB_SOP
=
"http://47.94.101.239:9004/#/manySop"
;
public
final
static
String
WEB_SOP_DETAIL
=
"http://47.94.101.239:9004/#/sopdetail"
;
public
final
static
String
WEB_ZHI_SHI
=
"http://47.94.101.239:9004/#/detail"
;
public
static
final
boolean
IS_DEBUG
=
true
;
//
public static final int LOG_LEVEL = LogUtils.LEVEL_ALL;
//
public static final String ENVIROMENT = "debug";
//
public static final String BASE_URL = "http://47.94.101.239:3112";
//
public final static String UP_PHOTO = "/file/uploadMore?targetPath=test/sp/mobile/android/business/checkApply";
//
public final static String WEB_SOP = "http://47.94.101.239:9004/#/sop";
//
public final static String CHECK_MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manyServiceResult";
//
public final static String MULTI_WEB_SOP = "http://47.94.101.239:9004/#/manySop";
//
public final static String WEB_SOP_DETAIL = "http://47.94.101.239:9004/#/sopdetail";
//
public final static String WEB_ZHI_SHI = "http://47.94.101.239:9004/#/detail";
//
public static final boolean IS_DEBUG = true;
/**
* uat环境配置.
...
...
@@ -40,16 +40,16 @@ public class Constants {
/**
* 正式环境.
*/
//
public static final String ENVIROMENT = "release";
//
public static final int LOG_LEVEL = LogUtils.LEVEL_ALL;
//
public static final String BASE_URL = "https://mobile.kf.ai";
//
public final static String UP_PHOTO = "/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply";
//
public final static String WEB_SOP = "https://sop.kf.ai/#/sop";
//
public final static String WEB_SOP_DETAIL = "https://sop.kf.ai/#/sopdetail";
//
public final static String WEB_ZHI_SHI = "https://sop.kf.ai/#/detail";
//
public final static String CHECK_MULTI_WEB_SOP = "https://sop.kf.ai/#/manyServiceResult";
//
public final static String MULTI_WEB_SOP = "https://sop.kf.ai/#/manySop";
//
public static final boolean IS_DEBUG = false;
public
static
final
String
ENVIROMENT
=
"release"
;
public
static
final
int
LOG_LEVEL
=
LogUtils
.
LEVEL_ALL
;
public
static
final
String
BASE_URL
=
"https://mobile.kf.ai"
;
public
final
static
String
UP_PHOTO
=
"/file/uploadMore?targetPath=online/sp/mobile/android/business/checkApply"
;
public
final
static
String
WEB_SOP
=
"https://sop.kf.ai/#/sop"
;
public
final
static
String
WEB_SOP_DETAIL
=
"https://sop.kf.ai/#/sopdetail"
;
public
final
static
String
WEB_ZHI_SHI
=
"https://sop.kf.ai/#/detail"
;
public
final
static
String
CHECK_MULTI_WEB_SOP
=
"https://sop.kf.ai/#/manyServiceResult"
;
public
final
static
String
MULTI_WEB_SOP
=
"https://sop.kf.ai/#/manySop"
;
public
static
final
boolean
IS_DEBUG
=
false
;
/**
* 演示环境
...
...
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