Questions tagged [location-provider]

117 questions
3
votes
1 answer

requestLocationUpdates with PendingIntent and Broadcast - what broadcasts do I get

I have setup an alarm which is received by a BroadcastReceiver which launches a WakefulIntentService (class LocationMonitor). In the LocationMonitor I have : private static final int MIN_TIME_BETWEEN_SCANS = 1 * 30 * 1000; private static final int…
Mr_and_Mrs_D
  • 32,208
  • 39
  • 178
  • 361
3
votes
1 answer

What is the use of "Maintain a current best estimate" of location Android?

I've read the documentation and this. What I don't understand is why this function isBetterLocation() even exists. The function tells the difference between "current location fix" and "new location". But what are those 2 locations really? I can…
2
votes
1 answer

locationManager.getBestProvider

I'm working on an application which uses location. My problem: When I'm looking for the best provider, I only get the "network". I know why but I don't know how to improve this. In the locations settings, when I check "parameter -> location" and…
Ivory
  • 77
  • 1
  • 10
2
votes
3 answers

Get location on click of a button with default provider

I need to get the current location using NETWORK_PROVIDER on the click of a button. If network is not available, I want to use GPS_PROVIDER to get location. How can I do this?
Santhosh
  • 4,956
  • 12
  • 62
  • 90
2
votes
2 answers

Is there any battery power consumption benefit if Network Location Provider (vs. GPS) is used?

Is there any real battery power consumption benefit if Network Location Provider (vs. GPS) is used? I believe there should be some benefit, but since I develop on emulator I can not prove my assumption. Does anyone have the evidence that Network…
Vit Khudenko
  • 28,288
  • 10
  • 63
  • 91
2
votes
0 answers

$locationProvider stops other scripts to load and displays nothing in console.log

I'm using $locationProvider as a dependency and used $locationProvider.html5Mode(true); on routes.js and used angularjs
Avinash Dv
  • 109
  • 1
  • 2
  • 10
2
votes
2 answers

How to get current latitude and longitude without using google maps android

I am trying to get the current location of the user either by GPS or location provider but every solution I have tried (many from stacksoverflow and google, youtube as well) gives a null as latitude and longitude. Here is the code I am…
U.Ahsan
  • 55
  • 1
  • 10
2
votes
1 answer

Angular Routing; exlamation mark beside hashtag in url

I trying to do routing but i can't. Related codes in app.js; var app = angular.module("app",['ngRoute']); app.config(["$routeProvider",function($routeProvider){ $routeProvider. when('/', { templateUrl:'pages/home.php' …
hakanz
  • 81
  • 6
2
votes
0 answers

Unable to call Node Server API using href="" after implementing $locationProvider

I am a junior dev so I apologize if I say anything incorrectly or am not clear on my explanations. I am creating a MEAN stack application, and all of the routing is working correctly when I put $locationProvider.html5Mode(true); on my config and I…
2
votes
1 answer

angular Cannot read property 'html5Mode' of undefined

in my angular application i want to make redirect with $location.path('/'); but i'm getting this error Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp due to: Error: [$injector:modulerr] Failed to instantiate module…
2
votes
1 answer

RequestLocationUpdate with Pending Intent and how to get the Location Provider(GPS, Network) status?

I have used Android SDK Location Manager to get the user location. I am requesting the location information by using Pending Intent. I have used pending intent because my need to send the location information even the app is not running. Intent…
M Vignesh
  • 1,586
  • 2
  • 18
  • 55
2
votes
1 answer

Location Manager.RequestLocationUpdates using pendingIntent always broadcasting the same location, when gps provider takes long time to get location

I am new to android development, I want my device to get GPS location every 40 seconds in background mode, even after the app got killed. For that, In MyAlarm.class, I have setRepeating the Alarm every 40 seconds to call a…
2
votes
1 answer

Getting 0.0 for longitude and latitude on tablet

I am getting longitude=0.0 and latitude=0.0 on tablet while this is working perfectly on the phone. I am using LocationManager.NETWORK_PROVIDER and not the GPS_PROVIDER so what could be the cause please? Logcat output?? that's my code: // Acquire…
Learning Android
  • 273
  • 4
  • 17
2
votes
1 answer

Issue using the Angularjs $location provider and ASP.NET MVC action links together

I have an application that uses both ASP.NET MVC and Angularjs. I'm using the Angularjs $location provider to modify the search part of the url when filters are added or removed. $location.search(searchObj); I am then subscribing to the…
Nicholas J. Markkula
  • 1,542
  • 4
  • 18
  • 30
2
votes
3 answers

Network location provider not giving location android

I am developing a small android application in which I want to find out the user's current location by using the network provider. I tried this in following ways but it's not giving me any output : networklocationManager = (LocationManager) this …
nilkash
  • 7,408
  • 32
  • 99
  • 176