Pushing messages to smartphones connected to a Wifi network - android

I'm new to mobile development and have a query: Is it possible to send a push message to all smartphones (irrespective of os/platform) connected to a Wifi network? The message would ask the smartphone user if they wish to download a file (PDF). The hurdle here is that these mobile phones need not download, or have already installed any specific app for the notification to be received. Any help would be appreciated.

There is no standard method of sending (pushing) a message to all devices attached to a Wi-Fi network. If there was a way, it would be easy to find the specification and point to how it is to be done. Unfortunately, it is difficult to prove the absence of something.
Send notification to all the devices connected to a Wi-Fi network

Related

How to send a message or alert to a mobile phone if it is connected to wifi?

Is there a method to send a message or alert to an unknown mobile which is connected to a free wifi(open LAN) network. I know this can be done using mobile application. But I'm expecting to do it with thought installing any app. Message have to be send only through the LAN wifi. Any idea please? Is it possible?
Being able to push unsolicited messages to a device would pose a security risk. Mobile devices do not have such a messaging protocol that would allow for such messages.
You may want to look into a "captive portal" which will redirect all network traffic to a specified page, perhaps a webpage with your intended message. A captive portal could be configured with a white-list to get close to what you are looking for.
Some phones will pop-up this captive portal upon connection (I know iphones default to doing this). Others may not see the message until they attempt to open a browser.
This solution does require such feature to be either enabled on your router (Few have this option, typically ones with a 'guest wifi') or an advanced configuration including a webserver and some sort of authentication.

Android 3g wifi simultaneously

I am using Android studio 2 and java, and i am writing an app that i need to be connected with a piece of hardware through wifi (parrot ar drone 2) and also "trigger" some events (takeoff land etc) through 3g network. I have made a simple app using parrot sdk that do some simple things to my drone successfully . I am facing now the challenge that these simple things i want to be driven through my server (i am thinking of websockets).
So my problem is :
If my device is connected through wifi to the drone, how could i also connect to the internet in order to get "triggered" to run some commands?
I was thinking that would be great if o could connect my android device to the drone and with some way be connected to internet.
After some research i have found that may be this functionality be available to android 6 BUT i have not found any example yet.
Generally i trying to find a solution (software or hardware).
I appreciate a lot any kind of help or suggestion about my problem.
Thx in advance
I don't think it is possible to connect to 2 W-Lan hotspots simultaneously with just one chip. Where did you find that information?
You can set up your Android device as a WiFi hotspot and have your drone connect to the internet via that.
At the same time your app can connect to the drone, assuming your drone has some sort of local server like connection your app connects to.
You can check this in practice quickly by setting up a Wifi hotspot, connecting your drone and then using a ping utility on the phone to make sure you can ping the drone successfully.
If you want to connect from a remote server to the drone then you are dependent on your network allowing inbound connections, which is often not the case. A common workaround is to use some form of mobile push notifications to send a message to your app asking it to contact a server on the internet, which will then tell it what action you want to perform on the drone. In others words:
send message to server on the internet somewhere to tell drone to take off
your server triggers a push notification to the app on the phone
the app contacts the server and asks 'what is the message for me'
the server responds to the app with the 'tell drone to take off' message
the app messages the drone to tell it to take off

Broadcasting a message throgh android clients using Wifi

I decided to build an android app to implement a chatting mechanism. this mechanism is a bit different of the usual chat systems.
It is not peer to peer messaging system rather we have a message sender and multiple repetitions. every reception after getting the message from source, repeats and resend it to others. the below image shows our broadcasting system:
in this system every message has an unique id so very client broadcasts the message just once.
i know socket programming and also UDP based solutions but in implementation phase the networking foundation is challenge. we don't have any centralized server so every clients should do listen a particular port and resend the given message.
I guess the reception need UDP to announce its listening open. also sender lists the its neighbors receptions over UDP protocol. then connect with them and sends the message. BUT here we don't have any access point or connectivity among sender and receptions.
Should I use hot spot? I am completely confused.
Please give me help or suggestions to implementing the network.
Try this, it seems to fit your specification.
The Wi-Fi peer-to-peer (P2P) APIs allow applications to connect to nearby devices without needing to connect to a network or hotspot (Android's Wi-Fi P2P framework complies with the Wi-Fi Direct™ certification program). Wi-Fi P2P allows your application to quickly find and interact with nearby devices, at a range beyond the capabilities of Bluetooth.

Android Broadcasting / Receiving Data without Wifi Hotspot or Wifi Direct

My question is that is it possible to send and receive data between multiple android devices via broadcasting over wifi without establishing p2p connection?
Our professor asked us to design a wireless network system in which you broadcast a message within your android phone, and the other android phones nearby receive it and broadcast it again so that the other phones can receive it and it continues like that. In this way, for example, when someone writes a message in a classroom or café everyone will be able to receive it and broadcast it again. (like an adhoc network system). And although my professor believes it can be achievable, I didn't find anything online like this kind of android network system. So my question is again is it possible to do something like that?
Any helpful leads and references will be appreciated.
Edit: I had to change the title of the question.
I couldn't find a proper solution so I tried the following method so far: I set up a UDP messaging app using Wifi hotspot (it works perfectly for multi clients). The phone who turns on the hotspot is the server and others who connect to it are the clients. Then, I decided to turn this system into an adhoc-like system where there would be more than one hotspot and the clients would connect to them in cycling order and serve as a bridge among these servers.(every second, they will switch to other hotspot and vice versa.) So, they will carry the messages from one network to another. (I know it is very inefficient and prone to time delays; but it is the only idea I have come up with so far.)
When I told this system to my professor, he said that it is too complicated and I just need to broadcast a message from a device to a common channel(without setting up a network connection), and other devices will listen to this broadcast channel(without connecting to a network system), receive the message and broadcast their own messages along with received ones to this channel again as I described in the question body. (he never mentions hotspot, Wifi direct, and etc.) He even told me that the only thing I need to do was to think simpler and use the properties of 802.11. But, I do not think it is that easy to set up such a wireless system, at least for Android where ad hoc systems are not supported yet. So any help will be greatly appreciated. Thanks!
The Nearby Connections API in Google Play Services released last week uses WiFi multicast: https://developers.google.com/games/services/android/nearby
It works for devices already on the same WiFi network. However, it uses a host/clients model, and doesn't work with WiFi direct or a tethered hotspot connection.
You could also use the WiFi direct APIs from ICS: https://developer.android.com/guide/topics/connectivity/wifip2p.html
You can have multiple devices connected together via WiFi direct, so firing UDP packets as #willis suggests would seem the way to go
It is implementable. Do you know the aircrack? similarly, you can receive all packets even not sent to you, and you can send any kinds of packets even not sent by you.

Is it possible to send a message from one android mobile to another android mobile using bluetooth or wifi with out pairing?

Presently I am doing my work in the android field. I am trying to develop an application to send a message from my bluetooth/wi-fi enabled mobile to other bluetooth/wi-fi enabled mobiles without pairing.
Is it possible to send message to another mobile in my blueooth or wi-fi range without pairing? If it possible how can I send the message to another mobile with out pairing?
If your talking about SMS this does not apply.
For Wifi have a look at this project http://code.google.com/p/remotedroid/.
For Bluetooth this thread explains how to archive what your looking for.
http://developer.android.com/guide/topics/wireless/bluetooth.html
To send data over to Bluetooth device all you need is the Mac address of that device.
Read the Bluetooth tutorial, its very helpful.
Shortly and sweetly, No.. You cant send messages to other mobiles without some kind of authentication.
For sending Message (SMS,MMS), I don't think so, Without pairing how could you know the device Id, to which you want to send a message, And if you don't pair the devices then how they communicated to each other,
EDIT: For bluetooth As per my knowledge it's impossible to send or receive data over RFCOMM sockets without pairing.
And for WiFi , setup parallel server/client threads on each device, and send whatever you want. To discover services on a local network you can optionally use zeroconf.
Look at these links,
Bluetooth pairing without user confirmation
Bluetooth SPP between Android and other device, UUID and PIN questions
How to send and receive data in Android Programming using bluetooth without pairing?

Categories

Resources