-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
receiveFile refactor #82
base: master
Are you sure you want to change the base?
Conversation
* receiveFile now uses Executor, instead of the deprecated AsyncTask; * stopReceivingFile() added: closes the listening port if no file has been received * a new optional parameter has been added to the receiveFile method. If receiveFile receives an object {meta: true}, then the promise result is not a string, but an object with the following format: { fromAddress: "<ip address of the origin in the p2p wifi network>", file: "file absolute path (string)" } Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
Hi @kirillzyusko and @seba9999 . I've done this refactor, it is compiling and the whole lib is running. However I could not do a basic test yet (sending and receiving file inside my app). If some of you can do this test, it would be good, if not, this will have to wait at least until next week. |
@viniciuscb I quickly went through changes and overall it looks good 👍 I'm going to have a look over weekend on this again but I don't think I will find anything critical. I'll try to test these changes, but it will be also not earlier than next week. |
@viniciuscb any updates from your side? 👀 |
I got some time to test it... But unfortunatlly I'm facing some errors on the sendMessage call : it seems that wifiP2pInfo is null but I've tried calling Just to be sure ... Your new parameter Then we should store other devices addresses on our own to then be able to |
Hi @seba9999 .
Yes, we have to store the senders by our own. I'll test this file sending method this week. Besides that, I think that we could update the examples. |
@viniciuscb any updates? 👀 |
@kirillzyusko can you merge and release those changes please ? With Expo I'm unable to test this new code until you make a new release 😢 |
@seba9999 I can not publish a release which potentially can be broken. You can use this PR/branch to install dependency with this code 🙂 |
Yep sorry nevermind since then I was able to try and I've sucessfully Works great ! Feel free to publish the next version then ;) ( I didn't test the senFile / receiveFile ) |
@seba9999 okay, I will publish new version soon! P. S. published! |
receiveFile now uses Executor, instead of the deprecated AsyncTask;
stopReceivingFile() added: closes the listening port if no file has been received
a new optional parameter has been added to the receiveFile method. If receiveFile receives an object {meta: true}, then the promise result is not a string, but an object with the following format:
{ fromAddress: "", file: "file absolute path (string)" }