location-provider

Android. How to know if location detected is from GPS or Network provider

邮差的信 提交于 2019-12-10 09:24:17
问题 I'm trying to implement an application which senses position from both GPS and the network provider and shows it on a Google Map. I succeeded in doing this, but I have a question: I get the provider in the onCreate() of my Activity (it extends LocationListener) locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); Criteria criteria = new Criteria(); provider = locationManager.getBestProvider(criteria, false); location = locationManager.getLastKnownLocation(provider);

Turn on Location Providers Programmatically in Android

∥☆過路亽.° 提交于 2019-12-08 18:31:59
问题 Is it possible to turn on LocationProviders(GPS Provider/Network Providers) on Device programatically, if it is turned off? 回答1: No, it is not, but you can open the Location services settings window: context.startActivity(new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS)); 回答2: Enabling Location with mode High Accuracy or Battery saving without user needing to visit Settings http://android-developers.blogspot.in/2015/03/google-play-services-70-places-everyone.html 回答3: private void

Network provider stops providing updates

坚强是说给别人听的谎言 提交于 2019-12-08 03:15:28
问题 I have noticed that rarely (every few days), my app stops receiving new location updates. The location listener is registered with both network and GPS providers. The GPS provider is off so any location updates come from the network provider. Every few days or so, I notice the location is old and not updating. From my debug log I can see that the location listener is being registered with location manager but there are just no new locations being found. onLocationChanged() is not called. The

AngularJS: Relative link paths are broken when html5mode(true) is on

倾然丶 夕夏残阳落幕 提交于 2019-12-06 03:57:18
问题 I've been searching and I've found "solutions" to this problem, yet I still can't get this to work right. The Scenario: I'm building an Angular (version 1.2) website with the UI Router and running it on a Node server on localhost. I'm trying to make it have "pretty" url's with the $locationProvider and by turning html5(true) on. My website works fine when clicking through it, but when I try to navigate to a relative link path or refresh the link path the page breaks. I also intend to deploy

Get precise Android GPS-Location in Python

守給你的承諾、 提交于 2019-12-05 02:11:24
问题 I try to obtain the GPS-Location of my Android Phone in Python (using QPython3 app). This kind of works, but it seems there are several LocationProviders in Android: gps: pure gps location, slow, energy consuming, but very accurate, and exactly what I need. network: mix of gps and wifi/cell locating, faster, but less accurate passive: like above but completely without using gps Problem: When I run my script (below) I only get my location provided by "network" wich is not accurate enough. But

AngularJS: Relative link paths are broken when html5mode(true) is on

可紊 提交于 2019-12-04 08:10:44
I've been searching and I've found "solutions" to this problem, yet I still can't get this to work right. The Scenario: I'm building an Angular (version 1.2) website with the UI Router and running it on a Node server on localhost. I'm trying to make it have "pretty" url's with the $locationProvider and by turning html5(true) on. My website works fine when clicking through it, but when I try to navigate to a relative link path or refresh the link path the page breaks. I also intend to deploy this webapp to Heroku when completed: RELATIVE LINK PATH: http://localhost:8000/locksmith-services PAGE

Get precise Android GPS-Location in Python

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 21:09:34
I try to obtain the GPS-Location of my Android Phone in Python (using QPython3 app). This kind of works, but it seems there are several LocationProviders in Android: gps: pure gps location, slow, energy consuming, but very accurate, and exactly what I need. network: mix of gps and wifi/cell locating, faster, but less accurate passive: like above but completely without using gps Problem: When I run my script (below) I only get my location provided by "network" wich is not accurate enough. But I can't find a way to force a specific LocationProvider. Code: # import needed modules import android

How to use both GPS and Network Provider to get current location Latitude and Longitude values in Android

纵然是瞬间 提交于 2019-12-03 06:20:54
问题 In my Android application, I want to use both the GPS provider and the network provider for location updates for 5 seconds. First, I would like to use GPS provider (because it gives accurate results), and if the GPS provider returns latitude and longitude as 0.0 and 0.0, then I want to use network provider, but I don't want to use both the providers simultaneously. Any suggestions? 回答1: package loca.loca; import java.util.Timer; import java.util.TimerTask; import android.app.Activity; import

Location updates not working indoors as claimed by Fusion Location Provider APIs

房东的猫 提交于 2019-12-02 20:50:26
Issue: Location updates not working indoors as claimed by Fusion Location Provider APIs. What happened: I tried implementing the latest location API to get location updates using LocationClient in my Android App. My android app works fine with out any issue while I am testing outdoor. But when testing indoors (inside any building), then no location updates are happening. Expected behavior: As per the new APIs, I am expecting to get some estimated location around the building while I am indoors (as GPS do not find the satellite signal for accurate location). I see that latest Google Maps

How to use both GPS and Network Provider to get current location Latitude and Longitude values in Android

六眼飞鱼酱① 提交于 2019-12-02 19:43:27
In my Android application, I want to use both the GPS provider and the network provider for location updates for 5 seconds. First, I would like to use GPS provider (because it gives accurate results), and if the GPS provider returns latitude and longitude as 0.0 and 0.0, then I want to use network provider, but I don't want to use both the providers simultaneously. Any suggestions? package loca.loca; import java.util.Timer; import java.util.TimerTask; import android.app.Activity; import android.content.Context; import android.location.Location; import android.location.LocationListener; import