Can i connect multiple phone via WiFi in android - android

I need to connect multiple phones to each other using wifi, without there being any internet though.
So i was thinking if this can be done by turning on the hotspot on one phone and allow the others to connect to it, can this be done ?
Or is there any other way to connect multiple phones via wifi ?
Any help is appreciated .. thnQ

To send and receive UDP messages you can using the following technique:
https://code.google.com/p/boxeeremote/wiki/AndroidUDP
The simplest way to explain this is that the UDP packages can be transmitted on a network with no particular destination set. Applications can pick this up and then decide if they want to handle the message or not.
To connect the devices you can use either a mifi dongle or put one of the phones into tethering mode:
https://support.google.com/nexus/answer/2812516?hl=en
Of course this is limited in range to the hosting mifi or phone.

Related

Is it possible to connect to own hotspot? (Android)

I created a WiFi-Hotspot with Android 10, and want to connect to it with the same phone. Is this possible with some "hacks"?
I know, it's a weird question and you may ask why I need this. The reason is that my provider granted me mobile data usage, that I only can use for sharing via hotspot. I don't know how they do it but it really only works for other devices connected to my hotspot - I myself can't use it. I also don't have a spare phone where i could put in my sim card and let it act as a router.
TL;DR: No, you cannot connect a device to its own hotspot, because devices only have one Wifi interface and those cannot send and receive transmissions at the same time.
You can find more about the topic on quora
https://www.quora.com/Does-my-own-hotspot-work-on-my-phone-or-just-other-peoples-phones.

Connect Android Tablets via cable/wire

I have 6 android tablets, and i want to connect them via a cable/wire, so that they can send messages to one another. (perhaps similar to way PCs may be networked with each other)
Once connected, apps running on the devices can exchange messages with each other via sockets or any other protocol. What are the best options?
Connecting devices over wi-fi is an option too, but then internet is not guaranteed in this scenario, and devices may be very far of from each other for any near field communication.
You can use usb->ethernet adapters and connect via LAN
Connecting devices over wi-fi is an option too, but then internet is
not guaranteed in this scenario, and devices may be very far of from
each other for any near field communication.
as long as all your devices and server (if any) are on same LAN or simply everything is connected to same hotspot you need not to worry about internet

Peer-Peer communication using wi-fi in android

I want to send a message from one android device to another through Wi-Fi.
I have two android devices , and Portable wifi Hotspot is enabled on both. I developed an application which displays a list of availabe wifi devices , and both of the devices lists each other.
Now I want to connect both and send a text from one device to another. What I know is that wifi transmitters transmit a beacon frame , which contains SSID , BSSID etc.
What should I do ? Should I apply a socket operation , but I don't have IP address.
I haven't done this so I can't provide code, but the answer is to use wifi- direct. http://developer.android.com/guide/topics/connectivity/wifip2p.html. That allows you to discover devices on wifi with you, then send data to them via normal sockets.
There is a wifi-direct sample app with the SDK.
Samsung recently released a simple API intended to make P2P apps easier to build - http://developer.samsung.com/chord
It only works on Android 4.0 and up, but it appears that is also the case with Wi-Fi Direct.

Is it feasible to connect some devices to Android or Iphone smartphone through Wifi?

I'm doing a research because I want to develop an app to which different devices connect.
The app can be an Android or iPhone smartphone. It will be for mountain equipment devices and sensors, so no wifi router is availabe. It needs long range, so Bluetooth is not an option.
I'm thinking on creating a hotspot in the smartphone and connect the devices to this hotspot. In this case, I'm thiking of this way of doing it:
Programatically create the hotspot in the smartphone. In Android, like this: http://www.whitebyte.info/android/android-wifi-hotspot-manager-class
Set up the name of the hotspot in the devices so they know where to connect. Pressing a button, they connect to the hotspot.
The android device broadcasts its IP, so devices know where to connect.
Devices connect and send the data.
I think this could be a real scenario, but I'm worried about:
Maybe there's a design flaw in my scenario that I'm not seing.
Batteries on the devices: how do batteries behave through "intensive" use of WIFI? (sending small amount of bytes of data every five minutes, e.g.).
The ability to replicate this scenario on an iPhone. Can it be done, or should the user manually create the hotspot to do this?
Any other feedback that I couldn't be thinking of.
Thanks.
Yes, on Android all of that can be done and should work fine.
Yes, you can programatically configure the hotspots info in the client.
Another way to make the connection (other then hotspot broadcasting its IP) is for the hotspot to reads it ARP cache, i.e. parse the cache to find the IP of all of the clients connected.
Battery could be a problem. That doesn't really sound like 'intensive' use of the wifi, but it will still consume a fair bit of battery (I find that even just having the hotspot enabled draws the battery).
I don't know the answer for iPhone.

Transfer data between two Android using Wifi

I'm trying to develop an Android application which have to be able to transfer data/message between two Android mobiles, as a client server connection using their own Wifi, which having no network or routers nearby. I just tried using Tcp program to do this but it fails, its not connecting, I'm getting ConnectException and connection refused.
[Edited] Is it possible to achieve this using Android Portable Hotspot integrated with application? Is there any tutorial regarding this approach?
Any Ideas, how to do this?
Thanks.
You need to get the two devices networked to each other before you can worry about tcp usage of that network connection.
If one device is willing to perform access-point like functionality as part of a portable hotspot, and you select that as a wirelss network on the other, you may achieve a network connection between the two that can be used for custom traffic. Though there are ways the hotspot could be implemented where that would not work. Also of concern, the "client" device will now be sending all of its network traffic through the hotspot device, including not just foreground apps but anything it decides to do in the background.

Categories

Resources