I am trying to hide SSID on my android phone. Can anyone please how to proceed for it? Is there any Android API available for the same?
Thanks in advance!!!
You can not hide AP SSID (stop SSID broadcasting or beaconing) through Android API!
SSID hiding depends on the kernel/wifi-driver that you have on your phone! Only few drivers (devices) support this feature! Also a few drivers support monitor mode!
Vendor-drivers have closed source :-( which makes it difficult to add these features to them! See bcmon project for example)
Android API allows you to connect to the network with specific SSID (it may be hided) programmatically. You should know network SSID and password (see this link about WifiConfiguration class and hiddenSSID, this link about WifiManager class, and these stackoverflow answers: programmatically create WiFi Configurations, connect to a specific WiFi network).
See this 3rd party App HiddenSSID Enabler for connecting to AP with hided SSID and this example: Connecting your Android tablet to a wireless network with disabled SSID broadcast
When SSID is hidden at wifi, you may not use wifi.
This software enable hidden SSID.
NOTE: This software will change wifi settings,
take responsibility by yourself.
Android App
Related
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?
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.
There is also sms or a phone call
I need to develop an android app for communicating tablet wireless. After some google search i found Wifi direct (Wifi P2P) is the solution for that. I have some doubt about this. I found wifi direct option in some Samsung device only.
Is every android device after ICS support Wifi direct? If possible how can i enable wifi direct service in those devices.
If not, Which are the wifi direct service available devices?
Can i create one to many network using wifi direct ?
WiFi direct is supported by most devices with Android 4.0 and above, and you can create one-to-many network with it.
There are lots of post on SO regarding setting up AP (Hotspot) on android mobile. However, in all these cases, the AP is a conduit to the outside internet world. In my case, I just want a server application running over a mobile setup as an AP. And let all the client android mobiles connect to it, send their data and disconnect if they like. No internet connection is assumed (i.e, no gprs/3g etc).
My observations: If I setup a wifi AP (via settings -> tethering and portable hotspots) when it is also connected to GPRS, then another android phone can successfully connect to this AP and send the data to the application. However, if I disable the GPRS, even though the client shows that it is connected to the AP, it can't seem to send any data. It seems that an external internet connection is a necessity for the AP mode to work.
Is this understanding correct? Or am I setting something wrong?
I know that I am late to the party (more than 3 years late :) but I was searching for a solution to this problem and stumbled upon an easy workaround. I am using a Nexus 4 with Android 5.0.1 and I can easily configure my phone to use it as an Android Wi-fi AP hotspot - without internet. Just go to Settings / Data Usage and disable "Mobile data" option under the Mobile tab. Then enable the WiFi hotspot option as usual.
I was trying to get this working in order to play with a VirtualBox machine from VulnHub.com that asked for a Bridged Connection when I was commuting to work (no Internet, but with my laptop and my mobile phone I was able to make it :)
I think you have used the internet IPs in your code not the local IPs for communications,is'nt it?
I have the same use case and was looking for the same info as you are. I checked that some of the WiFi-only tablets do not even have a HotSpot setting. Even the devices that do have it, if I remove the SIM card, I cannot enable the HotSpot (I get a message asking me to insert a SIM first).
It looks like our use case is not supported by Android. Rather, the HotSpot feature was not designed with our use-case in mind. I mean, why would an end-user want to use an Android phone or tablet in a HotSpot mode if it didn't also provide outside connectivity?
Should my Android phone automatically select wi-fi if available, if not then go to the next data service etc. If I use
connectivity.setNetworkPreference(ConnectivityManager.TYPE_WIFI);
will that ensure the same result or confine it to using wi-fi only.
Yes. By default android chooses WiFi network and if WiFi network is not available then it switches to mobile carrier network. To implement switch form WiFi to mobile network you can follow my answer over here: How to handle WiFi to Mobile network switch programatically?
If the Device is connected to a WIFI network will Android use that because it has 1. priority.
And you will almost always prefer using WIFI to your network operations. So you dont really have to worry about this.
I could see on my different devices (all HTC I have to say), under Android 2.1 and 2.2: when both 3G and Wifi are both enabled and available, the system switches down the 3G to prefer the Wi-fi.
The documentation says "When active, all data traffic will use this connection by default. " Whichever you set as your network preference, that will be made the default connection. The system default must be Wifi itself.
Does anyone knows if the wifi networks for android phones are based on Access Point Names (APN) ? I ask because in my android application I plan to overwrite some fields in all APN's to disable cellular network, but I still want to have available the wifi for the user
AFAIK, WiFi is independent from APN settings, i.e., if you mess with the APN settings WiFi will still work (cf. the APNdroid application).