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).
Related
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
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.
i am trying to develop an android app (named ContactListFinder) which follows the following steps
access contact list through android.provider.ContactsContract package
access phone number likewise
calculate the location of the sender and receiver in terms of lattitude and longitude and then find the distance between sender and receiver
pop a message if within coverage area otherwise no message is displayed
Now here the problem is "finding location using mobile number in terms of longtitute and latitute"
Any suggestion is welcomed.
"Finding location using mobile number in terms of longtitute and latitute" is, by definition, impossible. I have the same phone number everywhere on the planet, because I do not change my SIM card when I travel (domestically or internationally), and I am set up for international roaming.
"Finding location using mobile number in terms of longtitute and latitute, for people who use some sort of 'check-in' service to allow people to know where they are at all times, despite the fact that this sort of opt-in panopticon is truly frightening" may be possible. You would need to find such a service that has an API that allows you to find the location of arbitrary people by phone number. And, you would need both sender and receiver to use one of these services. And, you would need to ensure that your use of these services do not violate any privacy policies or other terms of use.
Nice app,you can find user location(longitude,latitude) not by phone number but you can find it using android location-based services provided by LocationManager class.So, you cant access user friends location unless they have app installed.so, you may have to create user community using your app and maintain central database containing all users location information.Hope this will help.
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
i am newbie to Android..i have latitude and longitude details in my program..i want to send them to web server via gps..and those details should be saved in a database and retrieve them whenever i require..plz explain me how to do..and if possible give me some sample code...
Did you mean the mobile network or wireless instead of GPS ?
Anyway:
You from the sounds of it you need to get the GPS details into your program then pass them to your server. Have you designed your webserver yet or are you going to be submitting this to a site that already exists?
You can't "send" something "via GPS". GPS is a "receive-only" thing.
http://en.wikipedia.org/wiki/Global_Positioning_System
If you like to send data to a web server, you can use the HTTP-protocol with Android, e.g. retrieve latitude and longitude (How to get Latitude and Longitude of the mobile device in android?) and then use HttpGet (or HttpPost):
http://developer.android.com/reference/org/apache/http/client/methods/HttpGet.html
You're really asking for a lot, but lets see if we can point you in the right directions.
Here is a great example of reading GPS data from an Android device:
LocationManager example
You must declare explicitly in Android that your app needs permission to access the Internet (and the GPS, for that matter).
Android Securty and Permissions
There are also some specific ways of life in Android development. The official developer's guide is a good place to start.
The Android Developer's Guide