I am working on an android application and I want to make this app be able to tell me how many devices are connected to the current access point I am attached to. What is the best possible solution for this. I don't want the details of devices instead I just need the number of devices connected to a particular access point. I want to use this data for my web GUI which will show the utilization trend for each access point. Please suggest the way how to do this.
Related
I am using LocationManager's requestLocationUpdates() to get the user's coordinates on opening the app, and it takes longer to get the coordinates than in other apps.
Getting location takes a while, however while my app is still loading and waiting for location (I am using LocationManager's requestLocationUpdates()) for much longer than other apps.
Here is a screenshot of my notification panel when I launch my application:
Notice it says Finding Location... when I open my app, because my app calls LocationManager's requestLocationUpdates() as soon as the app is opened.
Here's the meat of the question:
Even while this notification is in my presence, if I navigate to an app like google maps, it is able to pinpoint my exact location in a matter of seconds. Is that because google maps uses getLastLocation?
How come other apps are able to fetch location much faster than mine?
So there are two ways of getting location- fine (gps) and coarse (network). Google Play Services provides a 3rd method, but it uses a combo of those two. GPS takes a long time- it literally has to talk to 7 out of 2 dozen or so satellites to get a location for the first time. Network is fast, it just needs 1 network request (or less if data is cached).
A lot of apps will use both simultaneously, using the network to get a fast answer, and then improving to GPS when it gets that data. I know maps does this. This will get you a fast inaccurate answer, and allow you to improve the accuracy later.
You can use getLastKnownLoacation to go even quicker, but you have to be able to deal with it returning null. Generally network is fast enough.
I need to know if the Android API , it possibile get a list of all the operators mobile available in the moment and the realite info.
The Android operating system allows us to select the mobile network manually , so this work should be in some API,but I have not yet figured out which may be useful to me.
can someone give me a help to get started ? Especially is this thing possible ?
I have an application (however I'm testing using the sample bluetooth chat from the SDK) where two android devices connects each other, and exchange data.
I already have part of the pairing process hardcoded using the BT address, problem is: the dialog it appears to confirm the pin. Is there a way to make that work programmatically? The only thing that "appeared" to solve my problem was in this question, but that API is completely abandoned, has no documentation and many issues.
As fair as I know the problem is that if the device is not the device database with paired devices, without root access the standard API is always going to prompt the user, but I'm still wondering if there's a way.
Bluetooth autopairing is defined only for some devices. To change this you should rewrite Android framework. So, from the application, it seems to me, this is impossible to do.
I'm doing some work for my theses in networking, and have stumbled into a little problem. One of the first steps in the work I must do consists on having a computer working as an AP (I am using hostapd for this) and with it, detect all the devices in the room which currently have wifi turned on (do not need to be associated with any AP).
I have found a thread that pretty much asks the same ( discover mobil devices using wifi ), and I understand the answers that were given, but they don't give any hint as to how this can be done. The post ends saying that the person was able to do this using Kismet, however I can only seem to use Kismet to discover clients already associated with an AP.
Can someone point me in the right direction here please? If not using Kismet, then maybe suggest a different tool that works with Ubuntu.
Ps. I will need to run a continuous scan of the "room" to find any new devices and then send this information to an event manager written in Java.
I guess you could have a WiFi card, in monitor mode, scanning every channel for beacons. On Linux, aircrack-ng is the tool suite you are looking for. airodump-ng is the tool that shows you a list of devices present around your location. It is designed to display first the hotspots with the potentials clients, but also shows all the devices that are connected to an AP or trying to probe to an AP.
However, you won't be able to scan devices having their WiFi connection turned down. I'm not sure about devices not associated to an AP, my guess is you will be able to detect them if they send beacons one way or another (for example, to detect WiFi hotspots).
If you need this in Java, you can write a wrapper to airodump-ng, or you can launch airodump-ng as a service outputing to a file and read this file from a Java app.
No concrete answer I'm afraid, but I hope these will help you figure a way to solve your problem.
I'm in the process of starting a new Android project that will:
Display a Google map
Track and record users movements
Display the route on the map
Show local points on interest on the map
My question is what extra tools will I need to accomplish this? I can already get a basic Google Map working with zoom controls and place overlays etc. but my main concern is how I will track the users movements. I was thinking there maybe some sort of fleet management API but I really have no idea.
A link to some sort of tutorial would be great or even just to possible tools.
Use the class http://developer.android.com/reference/android/location/LocationManager.html to obtain the device geographical location
A Caltrans planning grant went towards creating an Android app called CycleTracks that does all of your bulleted items except the last one about points of interest.
You can download the source code here: http://www.sfcta.org/downloads/cycletracks/CycleTracks-android.zip
I haven't looked at the license to see how free you are to use it as a starting point, but I have to imagine it might be helpful just to be able to look at it even if the license is restrictive.
You can read more about it at http://www.sfcta.org/content/view/666/375.
You don't need any extra tools. Use the GPS or radio cells to get the location of the phone. This thread explains how you can get the location:
How do I get the current GPS location programmatically in Android?
If you want to Track the users movement you'll need to run a webservice on a server and have the app report the location of a user at regular intervals.
Be careful though, if you don't tell the user this is what you are doing, and provide an opt out, you could be pulled from the market pretty quickly.
Be sure you aren't recording any sensitive information as well. Usually position, phone type and OS type is allowed but much more could get you in trouble.