|
|
|
@ -30,6 +30,7 @@ public class MicroPhotoContext {
|
|
|
|
|
|
|
|
|
|
public static final String PACKAGE_NAME_MPAPP = "com.xypower.mpapp";
|
|
|
|
|
public static final String PACKAGE_NAME_MPMASTER = "com.xypower.mpmaster";
|
|
|
|
|
public static final String PACKAGE_NAME_MPRES = "com.xypower.mpres";
|
|
|
|
|
|
|
|
|
|
public static final String SERVICE_NAME_MPSERVICE = PACKAGE_NAME_MPAPP + ".MicroPhotoService";
|
|
|
|
|
|
|
|
|
@ -231,6 +232,22 @@ public class MicroPhotoContext {
|
|
|
|
|
return path;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static String buildMpResAppDir(Context contxt) {
|
|
|
|
|
|
|
|
|
|
String path = Environment.getExternalStorageDirectory().getAbsolutePath();
|
|
|
|
|
if (!path.endsWith(File.separator)) {
|
|
|
|
|
path += File.separator;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
path += PACKAGE_NAME_MPRES + File.separator;
|
|
|
|
|
File pathFile = new File(path);
|
|
|
|
|
if (!pathFile.exists() && !pathFile.mkdirs()) {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return path;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static boolean hasMpAppConfig(Context context) {
|
|
|
|
|
boolean existed = true;
|
|
|
|
|
String appPath = MicroPhotoContext.buildMpAppDir(context);
|
|
|
|
|