Skip to content
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

Transfer String data to wifi enabled device. #3

Closed
Rashesh-Bosamiya opened this issue Dec 2, 2019 · 4 comments
Closed

Transfer String data to wifi enabled device. #3

Rashesh-Bosamiya opened this issue Dec 2, 2019 · 4 comments
Assignees

Comments

@Rashesh-Bosamiya
Copy link

Firstly, thank you for this wonderful library.

I want to transfer data using wifi to connected wifi hotspot device. e.g. Android device has started hotspot, I have connected my iPhone wifi to that Android's hotspot. Now want to pass String data to that Android device.

Is it possible? How can I achieve this functionality just like Xender.

Thanks,
Rashesh

@Feghal
Copy link
Owner

Feghal commented Dec 2, 2019

Hello, dear Rashesh Bosamiya,
Actually, the library does not provide such a functionality, it is just for discovering IP address, but according to my experience, you just need to run on android device small Http server such as NanoHttp(or anything similar) and make a call to it using gateway IP address as server IP(you can get it with FGRoute when it is connected to hotspot). You can make calls like you do to the backend, GET, POST, etc. In this way, the android device becomes a small, local server for your ios app.

p.s. this is the easiest way, also you can try to use sockets.

@Rashesh-Bosamiya
Copy link
Author

Thank you, @Feghal , for your response.

I will look forward into the way you suggested.
However, In order to make API call do we really need internet connectivity using gateway IP address as server IP?

Further more, I am not much aware about sockets, can you suggest good library for socket connection?

Although, I would like to contact you separately for help, if required.

Thanks!
Rashesh

@Feghal
Copy link
Owner

Feghal commented Dec 2, 2019

@Rashesh-Bosamiya No, there is no need for real internet connection, also it will not spend any data, because You will perform http requests locally, so your endpoint will be the android device itself.
I can only suggest you to use CocoaAsyncSocket for iOS, but for Android side I am not sure. This question is not related to library itself, so future-more if you will have any question about this, contact me via my direct email feghaldev@gmail.com, I will be happy to help.

@Feghal Feghal assigned Feghal and unassigned Feghal Dec 2, 2019
@Feghal Feghal added the question label Dec 2, 2019
@Feghal Feghal self-assigned this Dec 2, 2019
@Rashesh-Bosamiya
Copy link
Author

Thank you, @Feghal.

Firstly, I admire your considerable suggestions.
I would expect to keep this ticket open, until I come up with certain solution.

Again Thanks!
Rashesh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants