Android: how to get the last 50 cell (tower) location details? - android

By default android stores the last 200 wifi connections and 50 cell location details.
I got the wifi details by using getConfiguredNetworks() from the WifiManager
Similarly I want to get the last 50 cell location details.
Please see https://play.google.com/store/apps/details?id=ch.rrelmy.android.locationcachemap
In this example they passed the API key to the server. How do I get the key for my mobile?

According to this: https://github.com/rrelmy/LocationCacheMap accessing the cache you mentioned requires root and presumably because of that it isn't supported by the SDK.
What I did find, is that you can probably build your own location cache by listening for them: follow these instructions and store the lat,long pairs of the towers in a SQLite database.

Related

Android Offline tracking gives zigzag path

in my android application i need to track user location online and offline mode ,for this i am storing user's location coordinations in server and at admin retrieving those coordinates to draw path , online mode working fine but whereas i am getting this problem in offline mode , offline mode gps providing coordinates drawing the wrong path , how can i solve it please guide me .
check this image
If it's working on the online mode, I would suggest the following:
Verify that the timestamps of the offline locations are correctly
saved and sent to your server. Use the getTime method on
android.location.Location instances to get the right time. Relevant
docs
In offline mode, the accuracy of the data collected can be
significantly affected, and you can evaluate whether the data collected
after verifying the previous point is accurate for your use-case.
Disclaimer: I work at HyperTrack and we build SDKs to get accurate location data and build live location features.

How to retrieve the location of another android device?

First of all I would like to mention that this would be done with the consent of all users!
That being said, what I am trying to create is an application where the users would see their location and the location of all the other connected users (latitude and longitude).
I am pretty sure the best way to do that would be to send data to a server and then have each device retrieve that data but I would like to know if there exist other ways of doing this. Or perhaps someone could point me in the right direction on how to create such a system with a server retrieving and sending data to android devices ?
GPS coordinates will do for you. You can get the coordinates and save in server then all the coordinates of a particular device can be retrieved by any connected device.
We have Location and LocationManager in android which shall do the job for you. Read more about these in the Android Developers

Get location name in android without internet

There are several methods to get location name using lon&lat like GeoCoder or GoogleMap API.
But these methods need to internet for their job!.
is there any way to get location name without internet access?
note:in some device location name discovered as CellInfo
I might be wrong but I seriously doubt that it's possible to store a mapping of Lat/Long with the name of the place in an Android device. You need a server to store this amount of data.
But you could create your own database with some location (those you use frequently).
Or just use internet when it's possible (on WIFI only).

Storing local Cell-id to lat/long database, to accommodate the same range for the new offline google maps?

I have read many q and a's about this subject, but not quite what I am asking. Is there a way to store the cell-id to latitude - longitude database for the local area only, like the google maps new offline feature, could you get the localized information and store it, to cover the same ground as the map?, I am looking to make an android app which works offline, which is power efficient, and this is the best option that I have thought of. I have checked opencellid, and the kml file it provides, would that be enough to find the location without an internet connection or gps?
You could explore the offline database option provided by LocationAPI.org to use for your app. Storing 36 million+ cells offline would be a task though!

How to get the name of the nearest city

I have some app that sends some information to the internet from time to time let say ones at day. And I can easily send some coordinates (using the gps position) but I do not want that. The android phone is always connected to the internet via wifi or mobile network. But not always enabled the gps. So is it possible to get the location with wifi or mobile network ? I google this thing and I end up with finding location by gps, I do not want to do that.
Can you give me some ideas what can I do this. I have seen web sites that when I open them they know where am I, so I guess it is possible to find the nearest name of the city just by making a internet request and reading the response or maybe use some service . . .
Thanks
http://developer.android.com/reference/android/location/package-summary.html
http://developer.android.com/reference/android/location/Address.html#getAddressLine(int)
getLocality looks like it may do what you want?
For websites that know where you are, they either use your source IP and look that up (which isn't very reliable for a lot of things), or they use the javascript geolocation APIs as described here:
http://merged.ca/iphone/html5-geolocation
In fact, here's a stack overflow answer on using google API to get to the city name:
Get city name using geolocation

Categories

Resources