What i have: currently my app only receives latitude and longitude based on user input (user inputs the Latitude and Longitude of the preferred location)
What i want: my app to receive the name of location as user input..
How can i go about doing it?
Must i use database? Any preferred links(for tutorial)?
Thank you in advance.
reverse Geo-Coding is very good, but you can only use this feature with Wifi connection. If your device is connect via Mobile Data connection (3G,EDGE), this service will not work.
Related
A message should display when I'm entering a specific address except address number for instance "Kristian Augusts gate
0164 Oslo".
When I walk to the address and suddenly my gps phone discover that I am located at "Kristian Augusts gate 0164 Oslo" then message should display
How do you create such a functionality? Any advice or tutorial?
Thank you!
First, you need to use a GPS service. You can either do it using Android API or Google Play Services API. The latter is a little more complicated and resource-intensive, but will provide more reliable location methods and callbacks.
Get location using Google Play Services
Then, when you already have the longitude and latitude you can easily get the address associated with that coordinates.
Get address from coordinates
Then you simply check if the current address is the same as the address intended to trigger the message and display it, using an AlertDialog, Toast, system notification or whichever method you need.
I want to make app without use of GPS, and my app is using user's address. so for that i want any idea of getting address without GPS. I want address, not latitude and longitude. Geocoder can be use for getting address but its again using GPS. Please provide solution for my question.
without GPS you can not find address
Get the user to manually enter their address. or bite the bullet and use geo-coding.
EDIT:
you have 2 choices:
1) Use lat/lon and geo - coding to determine the address
or
2) User manually enters either lat/lon or address (which will not go down well)
1) You can get IP address by either $_SERVER['REMOTE_ADDR'] in PHP or using some external JavaScript application, and then pass it to some API like freegeoip and then pass received coordinates to Google. It's quite easy, but it's not reliable solution - it can be very accurate or totally inaccurate.
2) (preferred, but needs permission) You can ask user for with HTML5 Geolocation for his location and it's much more accurate (and then pass it to Google Reverse Geocoding)
I am currently able to get the city name in an Android application using GPS or network provider.
I tried with LocationManager, but if GPS is off the location manager and location is null. To improve the battery performance I don't want to turn on the GPS.
Is there any way without turning on the GPS able to get the city name in an Android application? Or if GPS is off why is location manager returning null? How can I solve this?
Querying the following URL will give the current IP address and location in JSON:
http://ip-api.com/json
You can then parse that to extract the values you want.
I have an idea of making an app in that truck drivers are there with GPS,SO they will get latitude longitude without internet,there will be an admin panel which can track the truck driver's location and location history,So My question is that the truck drivers will only having a GPS enabled Android device (WITHOUT INTERNET),SO how can the admin will track their location? Please suggest me for it .
I suppose you could try SMS messages, though, it might become rather expensive if the re-fresh rate for the location is high.
In simplest solution you would have a mobile device (you need to find one which incoming SMS you can fetch to the PC, might require some internet searching time) with normal number for receiving the SMS messages, or you could see whether you could get Operator service numbers (see whether using free-to-send number would be cheaper) and then get the data from the operator.
I am developing a android application in that i want find the user location using GPS. That is working fine .But if the GPS is Disabled means i want to find the user location based on the CellID and Loc .It is possible or not
It is possible means please tell me how to do that with sample code
Waiting for reply
Just request the "best" location provider, and you'll either get the GPS if it's available or the network (wifi / cell) if it's not.
LocationManager.getBestProvider()
You don't need to explicitly code to either GPS / network providers.
Here is complete tutorial of Location-Based Services Using CellID in Android.