I want to non-selectively be able to receive a subset of all Wifi routers' information in range of the Android device. However, in the WifiManager API I only see the getScanResults() method returning List (the results of the latest access point scan). Is there a way to get a subset of this list at the expense of smaller scan time?
There are no such APIs in WifiManager
Related
I'm developping an app which may send sensitive data and I want to be sure that i don't send them on a public or weak protected network.
That's why I'd like to get the current security used on wifi network on Android.
I found this post but I'm not sure of the accuracy of the solution.
Indeed, the allowedKeyManagement method seems to return the supported protocols, but it's not explicitely said to return the current active protocol beeing used.
Is there a sure way to get the effective protection used on the cirrent wifi network ?
Thanks
I can suggest one method
Get list of all configured network using getConfiguredNetworks API
Loop through all entries and find the current Network using WifiConfiguration.status API. The status should be CURRENT for current network
For that current network, get the allowedKeyManagement and check that it is not NONE.
I am a beginner in android developing and I am working on a project to create an app to locate cell phones without using GPS.Can anybody help me with how to get the RSSI for GSM and the distance if possible.Any code available for this purpose would be appreciated really.
I would also like to know, what other information can we get from the SIM card.
For SIM information including RSSI, you need to look at the Android Telephony and related APIs.
You can't get the distance from the base station though. You can get the Cell Id, which gives you a rough location if matched up to a database. Cell Id information is proprietary though, and publically available databases aren't always that accurate. Or you could use three Cell Ids + RSSIs to do a rough triangulation calculation yourself. The disadvantages with that are that many devices won't return cell info for the surrounding cells; you still need access to a reliable database of cell locations; ideally you should also include known WiFi hotspots; it's a lot of work to implement something that Android has already done.
Android handles location via its own location and location services APIs. LocationManager lets you choose the desired technology, e.g.NETWORK_PROVIDER or GPS_PROVIDER. So you could just choose not to use GPS, and let Android give you the best available result from the network.
I a trying to understand and modify the BLE sample von Android.com, now I can discover my sample BLE Device (HTC Fetch) and now I want to understand all that GATT and BLE stuff.
What are Characteristics and what are Profile and what are Serivces and what do they mean in the Bluetooth Low Energy World? I used HTC Dev and found a Service and a Characteristics UUID.
https://www.htcdev.com/devcenter/opensense-sdk/bluetooth-smart/htc-fetch/
But I guess what I need is the Find Me Profile, cause for the first steps I only want to get the Find Me react to a Button click.
https://developer.bluetooth.org/gatt/profiles/Pages/ProfileViewer.aspx?u=org.bluetooth.profile.find_me.xml
How to implement this in my App?
When I understand everything I try Power and Proximity (reading RSSI and compare with defined range).
Can some one help me understanding Bluetooth LE?
Here's a related post
How to use the profile of PROXIMITY PROFILE,IMMEDIATE ALERT SERVICE and Find Me Profile in android 4.3 BLE?
Basically you can approximate a proximity level using tx+power - rssi or distance roughly with
d = (rssi-A)/-20 (where A = rssi at one meter) or simply use rssi mapping out ranges to display You could also initially base it on just the connection range and skip rssi.
As for the FindMe, simply write the low or high alert values to make it sound when you press a button in your app. For pressing a button on the device use the UUIDs shown in the documentation.
sample code for that device is forthcoming
Is there any way in Android to detect all available carrier networks in the area. I tried to search it from connectivity manager and it seems it only returns active network info. I also tried the telephony manager and it only returns signals and neighbor info of the active carrier (e.g. other signals of same carrier). I would like to create an app that will scan for available cell networks in every country -- like in Settings -- to choose my network when roaming.
as far as i know that is not possible, because you can only get the cell info of your SIM carrier, but we have a new method on TelephonyManager called getAllCellInfo ().
The problem is that method its only available on API Level 17, only available on devices with Jelly Bean (4.2).
Check this link for more information.
Even the getAllCellInfo function will never report "all networks" that are in the air at your location, simply because the phone will only listen to / measure on the frequencies / networks that the current serving cell tells it to measure on. Normally this means that it will only measure (and be able to report cells) from the same network as the phone is currently using.
If the phone has lost coverage from its "home PLMN" (home or selected network) it will however periodically do measurements in other frequencies to try to get back to it's "favourite network".
To be able to get lists of all present networks in your area you need to have another kind of device for example a "scanner", which never locks on to any cell, but continuously scans many frequencies to find cells from any network and any radio access technology (GSM/WCDMA LTE for example) within these frequencies.
Or continuously press the "select network" function...
/ Kenneth
I am trying to scan the strength of several wireless signals. For that I use the WifiManager, in a loop I call startScan() and I have a broadcast receiver to get the results.
My question is:
How can I make a scan ONLY for some networks? In the results I get all the networks available. Can I filter the scan to search only for some bssids? or ssid? I don´t care about other values than the ones of my AP´s. And I need to do this scan with the highest frecuency possible.
Another thing is: when I call startScan again (500ms after the previous call) does it stop the scanning? Because I want to reduce to maximun the frequency of getting the signals streght and it seems that the results sometimes are incomplete??
Would it be possible to modify the source code of WifiManager class to filter the scan to some ids?
Thanks a lot!
No, you can't set a filter, but you can filter the results later on yourself, which should have not a big performance hit (filtering a list with < 100 entries). Also, from my experience, if you request a scan while a scan is already running, no new scan is initiated. Therefore there is no point in starting a new scan before the last scan has returned results. You also can't modify the WifiManager as it is part of the android platform.