|
|
|
@ -430,10 +430,14 @@ public class MainActivity extends AppCompatActivity {
|
|
|
|
|
private void saveAppConfig(String cmdid, String server, int port, int protocol, int networkProtocol) {
|
|
|
|
|
|
|
|
|
|
String appPath = MicroPhotoService.buildAppDir(this.getApplicationContext());
|
|
|
|
|
|
|
|
|
|
OutputStreamWriter outputStreamWriter = null;
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
File dataPath = new File(appPath + "data/");
|
|
|
|
|
if (!dataPath.exists()) {
|
|
|
|
|
dataPath.mkdirs();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
|
|
jsonObject.put("CMDID", cmdid);
|
|
|
|
|
jsonObject.put("Server", server);
|
|
|
|
|