can i use gps to track my location when i an offline - android

I want to make an app for android phones which will gives some notification when it reaches certain point . Is it possible to do it using GPS ? And is it possible to make user download maps and then use that map to track location using GPS system , i mean can i track device location without internet using GPS and gives notification when phone is offline .if it is possible then please give me some guidance how can I do it

you can get location with no cell tower by satellite. it is free and called fine location. cell towers are less accurate form of location. The map used to display the location must have a connection to the internet however and you get maps via google This is free to develop apps but when you sell the app google takes a cut.

yeah we can get our current location in offline by using FUSED LOCATION
refer here

Related

Getting Location In Android Without Location Service

Is it possible to get location in android without enabling location service of android device ? I need to get location from nearest mobile tower, so is it possible ?
You could use getLastKnownLocation() of FusedLocationAPI. This doesnot involve enabling location services.
As per docs:
Using the Google Play services location APIs, your app can request the
last known location of the user's device. In most cases, you are
interested in the user's current location, which is usually equivalent
to the last known location of the device
.

getting latitude and longitude of an address in android using gps and without using internet connection

I want to know if gps can be used to get the latitude and longitude of an address.I've just began to work on gps on android.My problem is that if the user does not have internet connection, i want him to be able to get the latitude and longitude of an address.Can gps do that or it is only used to get current location.If not are they any other way of getting this done.I;m using google maps and i've also tried to get geocoding as mentioned in some posts,but it does not work.
From your question,
If you are using Google Map and GeoCoder class that means you must have Internet connection. And moreover when you are working with GPS, again you must have Internet Connection. If you are using GPS_PROVIDER then you required open sky type environment and for NETWORK_PROVIDER you can fetch gps details inside a room,but for both provider Internet is must.
You are missing the point of what GPS is designed to do.
Your phone's GPS doesn't do anything with an address. All GPS does is get the latitude/longitude of your current position, nothing more. The phone (via an internet connection) is able to identify your address based on the Latitude/Longitude that the GPS provides by using 3rd party provides (such as Google Maps)
It sounds like you just want to get the latitude/longitude of any address, not just for the device's physical location. That does not require GPS at all. But it needs an internet connection in order to access a provider to perform the geocoding.
A answer I provided to Does GPS require Internet? is a somewhat related to your issue. The 2nd to last paragraphs are pertinent here as well
While it requires a significant amount of effort, you can write your own tool to do the reverse geocoding, but you still need to be able to house the data somewhere as the amount of data required to do this is far more you can store on a phone, which means you still need an internet connection to do it. If you think of tools like Garmin GPS Navigation units, they do store the data locally, so it is possible, but you will need to optimize it for maximum storage and would probably need more than is generally available in a phone.
So effectively, you theoretically could write your own tool, cache data locally and query it as needed, but that not something that is easily done.

How I can get the location of the device if the GPS is off?

I would like to get the latitude and longitude of a device, if the GPS is off, well hopefully can be a precise location
You should use the new LocationClient that is part of Google Play Services Location API. It uses a fused provider that automatically determines what is the best provider available at that moment. It also uses other sensors to get a more accurate location.
you can get your location from three techniques and each one called Provider and each one has some pros and drawback and uses you don't care about it Google play services will making it for you but you need to have good understand of that , the three ways is
from GPS , Network , SIM(mobile device with sim)
and here some implementations of the techniques
http://developer.android.com/guide/topics/location/strategies.html

Why android GPS is not able to find location untill google map is on even if my phone supports A-GPS

I have make an android application which help us to get GPS Location using A-gps in my android phone. I am getting latitude and longitude successfully in Metro Cities of my country, but when I am going to some forest area,GPS do not get location and for this I need to run GPRS of my phone,after running google map once in my phone ,GPS successfully gets latitude and longitude even if I closes my internet connection or remove sim card from my phone. But since I do not want to use google map, what should I do now and why it is happening?? Any help will be appreciable
It takes a long time (several minutes) to get the GPS location with high precision. However, if you enable network based location (e.g. cell tower, WiFi), it's way faster but with lower precision.
As a result, you should listen to all the providers with LocationManager, and figure out which provides the best location. Or, if your app targets Android 8 and above, you can use the Location APIs provided with Google Play Services, which hides the details as using LocationManager directly.
First make sure that it is not the fault of your phone or its operation system version.
Download a well working known GPS App, look if they get a GPS signal without internet.
Place it under very good cointions: free view to sky, outside dense city, at least an open place.
You should get a signal within one minute, maybe if the phone has a poor built-in GPS antenna, a bit more, wait some minutes.
If the well working foreign app still don't get GPS it's an Operating system bug.
If you get one, then it´s your fault, and it is worth for further investigation.
*first check your GPS working or not properly with **ANDROITS GPS TEST*.
if it finds and fixes satellite do not worry. as AGPS is fast , standlone GPS needs to have much more time to fix on its own especially in city as many radio waves disturbs GPS fixure.
better first fix with AGPS and then you can turn off data or internet, still it will work as it already had its location and satellites fixed.
with standlone GPS it takes huge time and battery.**
If your phone use GPS h/w to get the location information, it don't require any internet connection. It should be able to get the location fix using GPS without the help of internet. But it may take some time to get the location fix.
You can install the this free app from play-store to test the GPS of your phone : "TestYourGPS".
https://play.google.com/store/apps/details?id=com.eorsavik.testyourgps

How to know if android phone is inside of a certain building name?

I was wondering was there a way to track if the android device is inside of a building and retreieve what building by using the location manager? without having GPS being turned on.
Even if you had a Lat/Lon location, you would then use GeoCoding to get the address from the location, addresses may be shown as 2 or 3 buildings in a single location, my home address is shown as a range of house numbers including my neighbours. Without accurate GPS, you wont have enough accuracy.
Android device can get device location over the WIFI or from GSM antennas too, but this is not very accurate. Location technology that is "coarse" only knows where you are within several hundred meters. I think you can not get right results.
If you want to try it, you need to add ACCESS_COARSE_LOCATION permission to the AndroidManifest.xml file.

Categories

Resources