2

I want to create an android application.

Is it possible to send a notification from my phone to other phone which has enabled its WiFi hotspot.

I mean, one phone has enabled its WiFi hotspot and I scanned available WiFi devices and I saw its WiFi hotspot ssid at my available wifi list and I want to send a notification or a message without connect its wifi hotspot point, or using bluetooth or using internet. Is it possible?

Ozlu
  • 1,255
  • 1
  • 14
  • 20
  • Wifi hotspot has nothing to do with passing information to another device. Communication between devices happens between the network it is using. – JoxTraex Aug 21 '15 at 16:57
  • If you don't let connect your device to that hotspot then no you cannot exchange information. – greenapps Aug 21 '15 at 17:31
  • Thanks a lot for your advices. You're right, if these devices are not in the same network, they can't communicate. – Ozlu Aug 21 '15 at 20:55

2 Answers2

0

There is also NFC - Near Field Communication. It has nothing to do with Wifi though.

So in theory, yes, I believe you can do what you asked. I think you can react to the presence of the other phones Wifi hotspot, but communicate on NFC instead.

As for sample code, I can't help you. I haven't written anything using NFC.

Ash
  • 21
  • 3
  • Yes, NFC is the good option for communicating between mobile phones but many mobile phones have not NFC so it isn't solution for me. Anyway,thanks a lot your advice! – Ozlu Aug 21 '15 at 20:57
  • Okay then, what about audio? Wouldn't work in a noisy environment perhaps, and seems like a really low tech approach, but potentially doable. – Ash Aug 22 '15 at 01:37
  • Actually, I don't understand. How can communicate two phones by using audio? – Ozlu Aug 24 '15 at 00:30
  • I guess, Nfc is the best choice for communicating between two phones(best choice for my case). Can I use nfc feature on android emulators? Do you have any idea for that? – Ozlu Aug 24 '15 at 01:03
  • Audio communication: Each device has a microphone and a speaker. Use tones to communicate between devices (just like the telephone network used to). There is an API to generate tones (DTMF etc.), so that part is done already. You'll need to write a tone decoder (or look for one already written). If you generate single tones, capturing input audio data and looking for zero crossing events for timing shouldn't be all that tough. NFC: I'm thinking that Genymotion will not emulate NFC as almost certainly the underlying hardware doesn't. I could be wrong though. – Ash Aug 24 '15 at 12:27
0

There is also sms or a phone call

sherif
  • 2,282
  • 19
  • 21
  • But how can I learn other mobile phone's number? Is it possible to get phone number from WiFi signal? I think, we can't! – Ozlu Aug 21 '15 at 20:59
  • well you can name the wifi with the number something like THE_WIFI_454211221 so you recognize THE_WIFI_ and take the rest as the phonenumber – sherif Aug 22 '15 at 20:51