Finish v1.47.16(529)
All checks were successful
WMS - Android (New)/pipeline/head This commit looks good
All checks were successful
WMS - Android (New)/pipeline/head This commit looks good
This commit is contained in:
commit
2f6f9b54c2
@ -11,8 +11,8 @@ apply plugin: 'com.google.gms.google-services'
|
|||||||
|
|
||||||
android {
|
android {
|
||||||
|
|
||||||
def appVersionCode = 528
|
def appVersionCode = 529
|
||||||
def appVersionName = '1.47.15'
|
def appVersionName = '1.47.16'
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
release {
|
release {
|
||||||
|
|||||||
@ -280,6 +280,7 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
|||||||
List<MailAttachmentDTO> attachmentDTOList = new ArrayList<>();
|
List<MailAttachmentDTO> attachmentDTOList = new ArrayList<>();
|
||||||
|
|
||||||
if (fileToShare != null) {
|
if (fileToShare != null) {
|
||||||
|
try {
|
||||||
var htmlContent = createAppLogAttachment(fileToShare);
|
var htmlContent = createAppLogAttachment(fileToShare);
|
||||||
|
|
||||||
byte[] buffer = htmlContent.getBytes();//specify the size to allow.
|
byte[] buffer = htmlContent.getBytes();//specify the size to allow.
|
||||||
@ -289,6 +290,17 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
|||||||
.setFileName("wms_log.html")
|
.setFileName("wms_log.html")
|
||||||
.setFileb64Content(base64);
|
.setFileb64Content(base64);
|
||||||
attachmentDTOList.add(logAttachment);
|
attachmentDTOList.add(logAttachment);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
String rawLogFile = getRawLogAttachment(fileToShare);
|
||||||
|
|
||||||
|
byte[] buffer = rawLogFile.getBytes();//specify the size to allow.
|
||||||
|
String base64 = Base64.encodeToString(buffer, Base64.NO_WRAP);
|
||||||
|
|
||||||
|
var logAttachment = new MailAttachmentDTO()
|
||||||
|
.setFileName("raw_log.txt")
|
||||||
|
.setFileb64Content(base64);
|
||||||
|
attachmentDTOList.add(logAttachment);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -461,4 +473,24 @@ public class MainSettingsFragment extends PreferenceFragmentCompat implements IT
|
|||||||
|
|
||||||
return htmlContent.toString();
|
return htmlContent.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String getRawLogAttachment(File logFile) {
|
||||||
|
//Read text from file
|
||||||
|
StringBuilder text = new StringBuilder();
|
||||||
|
|
||||||
|
try {
|
||||||
|
BufferedReader br = new BufferedReader(new FileReader(logFile));
|
||||||
|
String line;
|
||||||
|
|
||||||
|
while ((line = br.readLine()) != null) {
|
||||||
|
text.append(line);
|
||||||
|
text.append('\n');
|
||||||
|
}
|
||||||
|
br.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
//You'll need to add proper error handling here
|
||||||
|
}
|
||||||
|
|
||||||
|
return text.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user