I would like to write a program for Android cellphones. The program would be able to automatically request-data / send-data. The user is able to edit a given part of a file, and the main purpose of this program is that this file will be synchronized between Android devices, automatically - if they are close to eachother physically.
The question is, how to communicate between the Android devices? Because of some reason, the internet is not an option.
I could connect the devices through bluetooth or wifi, but it cannot happen automatically. A given Android cellphone cannot force another one, to enable the connection automatically through wifi or bluetooth. I am sure that this is not possible because of completely understandable security reasons.
I was thinking on this, and I figured out a possible solution. The given Android cellphone device is always changing its own wifi SSID which is publicly broadcasted all the time, and my program would change it in every "n" seconds (n = 5 or something like that) programmatically. Meanwhile, the program is scanning all the available wifi ssid-s nearby, and checking them if they are written in a "special" format, or they are "normal" wifi ssid-s (in this case -> don't care).
So I would figure out a given special wifi ssid text format, for example abc_0_123, which means abc is my device id, 0 means I want to request (and not send), and 123 is a piece of data to send/request.
(I know that the max. length of a wifi ssid is around 32 characters, it is not that many chars. But maybe that would be enough for me if I would be able to send 1 kB in 20 seconds or something like that.)
My questions:
- Is it possible to do this as I described (changing ssid-s programatically, and communicate using this)?
- Would it cause any problem on the Android device if I change programatically the wifi ssid all the time in every 5 (or something) seconds? For example Android (or an Android antivirus program which might be installed) would automatically shut down my program because it would think that my program is suspicious.
- Are there any other better solution for this problem?