-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to send Multiple Files? #3
Comments
Hey :)
Thanks for checking out the project. Currently I am not maintaining this
project though. You can read the code and understand more though :) sending
multiple files shouldn't be very tough
|
i have implemented the code to send multiple files on the sender side i have send the arraylist containing list of path of files sender thread `for (int i=0;i<filesToSend.size();i++){
but in receiver side after receiving first file it closes the socket. can you guide me please how to implement this on receiver side |
can you guide me logically how to send and receive multiple files.? |
I haven't thought much about sending multiple files. I am sorry, but like I said, I don't have much time to spend on this project, for now. I don't even remember how I implemented this. And I need to spend some time reading the code for both sender and receiver. But in an abstract way, I can tell this about receiving multiple files - you could think about a similar logic that you have done here, like using a loop and getting files. To start with, first send to the receiver the number of files you are gonna send, so that the receiver knows how many to expect and when to stop, similar to how we are currently file name, file size and then the file content, before all that, first send the number of files, it can be one, it can be two. I "think" currently your receiver does not have for loop, if it did, it would need the count for how many times to run the loop, or if there's no count, some sort of condition to break out of the loop. But I think sending the number of files that are gonna be sent could be a good start and it will also be helpful for the receiver to know if it received all the files, if it didn't, it will be easy to detect an error to tell that some files that were "expected" to be received were not received. I hope this helps 😄 @shahkarraza001 |
And if you find this project useful, please do contribute to it with features that you are building, if you think it will benefit others 😄 looks like sending multiple files is cool 😁 |
Thank you so much for your review and suggestions. I have already implemented the code to send multiple files. And i implemented the same technique. While sending the files , number of files are also sent to tell the receiver side. And receiver has to run the loop till numbers of files condition is break. And with that i had to change one statement., After receiving every single file, instead of closing bufferstream. I used bin.flush(), because bufferstream.close() also closes the connection as far as i know.
Get Outlook for Android<https://aka.ms/ghei36>
…________________________________
From: Karuppiah <notifications@github.com>
Sent: Sunday, September 2, 2018 9:03:08 AM
To: Android-File-Share/FileShare
Cc: shahkarraza001; Mention
Subject: Re: [Android-File-Share/FileShare] Send Multiple Files (#3)
And if you find this project useful, please do contribute to it if you think it will benefit others 😄
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FAndroid-File-Share%2FFileShare%2Fissues%2F3%23issuecomment-417903462&data=02%7C01%7C%7C12e564adb54945b54cb008d61088fe90%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636714577902504647&sdata=V%2BPjG8T8bCJbmMKK7Bt2KN0%2FtFo2n9AhGio6ayLxVGE%3D&reserved=0>, or mute the thread<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAks9DRovtD3i_4pfzBhR9PG_Hn_hLknZks5uW1h8gaJpZM4WNOFJ&data=02%7C01%7C%7C12e564adb54945b54cb008d61088fe90%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636714577902504647&sdata=uWXzkwSQd1egSPP3gVGi5QyW%2BYrJgNPINMKWLplAtWU%3D&reserved=0>.
|
Happy that it was helpful 😄 |
how can i contribute in this project. ? Will you please give me access . |
You can fork and raise a PR :) If you want to maintain this repo, then we
can discuss about access
…On Thu, Oct 4, 2018, 12:09 PM shahkarraza001 ***@***.***> wrote:
how can i contribute in this project. ? Will you please give me access .
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMNw6B0EUjENiYSzeSv1LzzKDw-T0RuLks5uha0bgaJpZM4WNOFJ>
.
|
okay.. 👍 |
I want to send multiple files using FileShare project. Right now i am able to send single file. But When I select multiple files to send, it only sends first selected file and then closes the connection. Can you guide me please how to implement that
The text was updated successfully, but these errors were encountered: