connectivity-samples icon indicating copy to clipboard operation
connectivity-samples copied to clipboard

File size

Open djethrak opened this issue 3 years ago • 0 comments

Sending a small file is going through well, but sending large files like music files is not going at all.

The byte is not sending correctly.

Here is my code to receive large file

if (isFirstValue){ isFirstValue=false; if (readMessage.length() > 4) { totalNumberOfString = Integer.parseInt(readMessage.substring(0, 4)); allImportValue = allImportValue+readMessage.substring(4); DEL+=readMessage.length(); setState(totalNumberOfString+""); }

                }
                else {
                    allImportValue = allImportValue+readMessage;
                    DEL+=readMessage.length();
                    if (totalNumberOfString==allImportValue.length()){
                       isFirstValue=true;
                        setState(allImportValue);
                        RecieveTxt(allImportValue);
                        RecieveDemox(allImportValue);

                        allImportValue = "";
                        totalNumberOfString=0;
                    }
                }

djethrak avatar Apr 14 '22 00:04 djethrak