Похожие чаты

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 ответов

12 просмотров

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- Автор вопроса

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

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

Какой-то там пердун в 90-х решил, что есть какая-то разная типизация. Кого вообще это волнует?
КТ315
49
Hi. Do we have a raid bot? Why nobody doing raids on X? Even RH mentioned this and nobody paying attention...whats the channel for hex memes? If mods cant run raids just insta...
H
31
Подскажите, а есть vault lite или ченить такое?) А то нужен вольт для похода в вольт, но весит он ~500 мб) как-то многовато для парочки запросов ))
Alexandr Orloff
17
блеать, почему так?? где в роутере это исправляется?
Арсен Маньяков 🇦🇲
16
void terminal_scroll() { memmove(terminal_buffer, terminal_buffer + VGA_WIDTH, buffer_size - VGA_WIDTH); memset(terminal_buffer + buffer_size - VGA_WIDTH, 0, VGA_WIDTH); ...
Егор
47
🌊 Ocean Nodes Dashboard Update 🚀 Hey, Oceaners! First off, a massive round of applause 👏to all of you for the amazing engagement since we launched Ocean Nodes. In just a few ...
KreigDK | Never DM first🌊
3
Всем привет! Подскажите, пожалуйста, в чем ошибка? Настраиваю подключение к MySQL. Либы лежат рядом с exe. Все как по "учебнику"
Евгений
16
А можете как-то проверить меня по знаниям по ассемблеру?
A A
132
Здравствуйте! У меня появилась возможность купить книгу "Изучай Haskell во имя добра!". Но я где-то слышал, что эта книга устарела. Насколько это правда??
E
22
люди, которые используют flameshot, к вам вопрос. Можно-ли поставить хоткей на создание скриншота? В программе есть отдел "горячие клавиши", но там все для редактирования, скр...
ThunDer104
11
Карта сайта