My Android device connects with a peripheral with the BLE2 library. Everything works correctly.
When I request the LOGs that are 5k long, it gives me an error. It seems like it's over the limit.
How can I solve this problem?
** Activity (main) Resume **
5568 (Len File)
java.lang.StackOverflowError: stack size 8MB
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:452)
at java.lang.StringBuilder.append(StringBuilder.java:137)
at java.lang.StringBuilder.<init>(StringBuilder.java:114)
at anywheresoftware.b4a.debug.Debug.shouldDelegate(Debug.java:245)
at it.tecnomedia.xxx.starter._readfile(starter.java:176)
Message longer than Log limit (4000). Message was truncated.
I expressed myself badly, it's not the log that crashes the application. the data that the device sends is approximately 5k and the maximum that the HEAP memory can receive is 4K, this generates a crash within the library.
The ideal is that in the library there was a method that instead of transferring data into an Array transferred it directly to a file.