WifiP2P icon indicating copy to clipboard operation
WifiP2P copied to clipboard

File transfer doesn't work!?

Open Erik-Lehnsherr opened this issue 3 years ago • 3 comments

Dear Sir,

Thanks for the sharing! I have tried your code on my 2 Android 9 devices. Although the two devices can connect each other, the file transferring is unsuccessful?

I have also tried this code on Android 10 device. However, when I clicked "Choose Document" icon on the top right corner, the app quitted unexpectedly?

May I know if any tips for fixing this issue? Any suggestions will be highly appreciated!

Thanks!

Erik-Lehnsherr avatar Aug 10 '20 05:08 Erik-Lehnsherr

Yes, I am also facing this same issue. The error occurs in doInBackground method in while loop. byte[] buf = new byte[512]; int len; while ((len = inputStream.read(buf)) != -1) { outputStream.write(buf, 0, len); total += len; int progress = (int) ((total * 100) / fileSize); publishProgress(progress); Log.e(TAG, "File sending progress:" + progress); }

kashish237 avatar Aug 10 '20 18:08 kashish237

遇到相同的问题,选择文件的时候应用崩溃。

zhonghanwen avatar Dec 28 '20 06:12 zhonghanwen

2020-12-28 14:47:44.608 10433-10433/leavesc.hello.filetransfer E/libc: Access denied finding property "ro.vendor.df.effect.conflict" 2020-12-28 14:47:44.611 10433-10465/leavesc.hello.filetransfer E/Perf: Fail to get file list leavesc.hello.filetransfer 2020-12-28 14:47:44.611 10433-10465/leavesc.hello.filetransfer E/Perf: getFolderSize() : Exception_1 = java.lang.NullPointerException: Attempt to get length of null array 2020-12-28 14:47:44.611 10433-10465/leavesc.hello.filetransfer E/Perf: Fail to get file list oat 2020-12-28 14:47:44.611 10433-10465/leavesc.hello.filetransfer E/Perf: getFolderSize() : Exception_1 = java.lang.NullPointerException: Attempt to get length of null array

zhonghanwen avatar Dec 28 '20 06:12 zhonghanwen