Похожие чаты

I'M tryin to write an app by which phones can

share files with eachother via hotspot/wifi connection. There are lots of file sharing apps using this approach, for example SHAREit.

As a start, I'm mainly focusing on multiple devices sending simple text messages to each other via hotspot/wifi connection. Having one device as server, and others as clients.
I already know socket programming in java, but I have no idea how to implement socket programming concepts on android using wifi connection.

Could anyone share links related for this application?
Code chatting program using wifi/hotspot connection would be much helpful.

4 ответов

21 просмотр

You have multiple options to choose from, you can use - mobile hotspots to bridge the network of two devices - WifiDirect API - You can use discovering services like NSD or JmDNS From my experience, if you dont mind how the two devices should initiate connection with each other, its best to rely on on same network transfer/mobile hotspot, then write communication code yourself. WifiDirect is also a better option over NSD or JmDNS. Initial discovery and connection time on NSD and JmDNS can suck a lot on different devices and different Android state.

Rastin- Автор вопроса
Melon Error
You have multiple options to choose from, you can ...

Thank you for your answer. Yes, I'm choosing hotspot sharing as means of communication, yet I don't find helpful links about it. what steps should i take in order to send a text message from device one to device two using wifi / hotspot connection?

Rastin
Thank you for your answer. Yes, I'm choosing hotsp...

First get both the devices on the same network. Hotspot or same Wifi. Then create a server on one device, and the other device plays the client. Its normal socket networking from this point.

Rastin- Автор вопроса

Похожие вопросы

Обсуждают сегодня

30500 за редактор? )
Владимир
47
any reference of this implementation?
BitBuddha
29
Ⓐrtto, [4/23/24 7:02 PM] Please explain more fully how it is not working exactly, and what are the steps you are taking, and what error messages come or what happens. Ⓐrtto, ...
Ezza Kezza
2
sounds like people have lost their kaspa on tradeogre... does this mean tradeogre not trustworthy?
Ezza Kezza
15
Страшнейшая правда про списки ЦБ. С первых дней жизни P2P сферы, молодые человеки, начитавшись законодательной базы и "внутренних" документов, решили, что им противостоит сер...
Foxcool
3
Недавно Google Project Zero нашёл багу в SQLite с помощью LLM, о чём достаточно было шумно в определённых интернетах, которые сопровождались рассказами, что скоро всех "ибешни...
Alex Sherbakov
5
So much speculation in the last week. So much volatility in price. This is because Hedera has a GC that isn't using the network it's governing. Why aren't people asking why a...
Summit Seeker R
8
Anyone else having this error when trying to make transactions?
Datzel
11
Question: How viable is it to use Anvil as the backend infrastructure for managing a TradFi portfolio, while integrating Flexa for instant liquidity and payment solutions? Cou...
Kevin
2
вы делали что-то подобное и как? может есть либы готовые? увидел картинку нокода, где всё линиями соединено и стало интересно попробовать то же в ddl на lua сделать. решил с ч...
Victor
8
Карта сайта