How exchange messages between 2 android devices through wifi and bluetooth without internet? I am currently working on the creation of an application for mobile devices with Android which should be capable of sending and receiving messages through local means like wifi and bluetooth. After making a research about it I found out that Android doesn't have a native wifi ad hoc functionality and that the only way to achieve that is through rooting your device and patching the wpa_suplicant and some other similiar methods which are not generic for every device. 

Synopsis of what I am trying to achieve:

An application for Android that scans for devices nearby and tries to connect to them automatically. If the other device also got this application isntalled then it automatically accepts any connection request it receives and when the connection is established it sends back a message which ensures that it has this app installed so that both can start exchanging messages automatically and the users don't have to allow/deny any of the sending/receiving in real time.

My questions are:


Is there any way of sending messages through wifi between 2 android devices without the use of internet?
Since Ad Hoc is not supported, is there any alternative?
In case the answer to 2 is no , then is it possible to make one of the devices to be an access point so the other can connect to it and vice versa.
As for bluetooth, is it possible to skip or automate the allow/deny pop up of an incoming connection and the pairing procedure?


I'll be glad if you could give me an answer to those and/or any suggestions.
I've myself worked on similar project in which not just text messages we were also interested in having audio chat (real time). As you pointed it, Android doesn't really support ad-hoc wifi functionality as of now (like u said that patching the wpa_suplicant isn't generic and frankly I'd call that method useless.) Also as your needs even I wanted to NOT use internet, so not being able to find any other way, for that time I just went with using any local wifi connection in proximity to connect with (just to be clear, still we're not using internet) I hope this possibly answers your points 1/2/3. I'm not sure whether a better solution to 1/2/3 exist atleast as long as Android people doesn't allow an ad-hoc to be created (or atleast joined..as of now one can't even join ad-hoc wifi from android if I'm correct)

Regarding 4, I'm again sorry to say that answer to that is also 'No'. When two devices connect first time, pairing has to happen. And, as far as I remember (I did this project a few months back and didn't get any time to continue/build upon) for subsequent connections to already paired devices it didn't ask for any confirmation besides our own confirmation which we asked to accept incoming voice call. Other than that bluetooth method actually worked perfectly fine.

Hope that helped. Let me know if there is something I can clarify more.

-Atul