google-location-services

Geolocation Current Position API not working in IE11.5 windows10

浪尽此生 提交于 2021-01-27 07:50:39
问题 Geolocation current position API is inconsistent in IE11 windows 10 machine. Below is the code function setCurrentPos(event, firstLoad) { navigator.geolocation.getCurrentPosition(function (position) { firstLoad || setCurrentLocation(event.target, position.coords); }, function (error) { 1 === error.code && ($this.currentLocDenied = !0); }); } 4 out of 5 times it is falling into the error block with response code 2(POSITION_UNAVAILABLE) stating "The current position could not be determined.".

FusedLocationProviderClient requestLocationUpdates doesn't trigger LocationCallBack for API 23 above

时间秒杀一切 提交于 2021-01-04 09:08:39
问题 I have run out of possible ways on how to solve this issue. I am technically using the same code that is working in API 23 and above before I made tweaks on my app. The callback (in the requestLocationUpdate) does not trigger in phones that are marshmallow and above (but it works fine in the emulator, tested using the Pixel 2 API 26 emulator). Take note that permission is already granted/allowed and GPS is also enabled. Also as you can see in the code below I already put a try catch and still

Location Java Script ceases to work when deployed

家住魔仙堡 提交于 2020-01-06 23:53:20
问题 When I debug my website locally in the login screen I see the map where I am and there are two textfields filled with my longitude and latitude, but when I deploy my website this ceases to work. The weird thing is that when I deployed it last year it worked perfectly. This is the view of login page: @using WebApplication2.Models @model LoginViewModel @{ ViewBag.Title = "Log in"; } <h2>@ViewBag.Title.</h2> <div class="row"> <div class="col-md-5"> <section id="loginForm"> @using (Html.BeginForm

Even PRIORITY_HIGH_ACCURACY gives very low accuracy location updates

不羁岁月 提交于 2020-01-04 05:39:10
问题 I'm using FusedLocationAPI to get high accuracy location updates (with 2 second update interval and 5 second fastest interval) . It works fine most of the times. But, sometimes it gives accuracy like 1200m. I understand that in the beginning it can happen. But, the problem I'm having is, I get fair (~20m accuracy) updates for a while and then suddenly switches to ~1200m accuracy. How can this happen in Fused API? 回答1: Sometimes it happens. Moreover, erroneous location fixes can arrive for 5

Android LocationRequest - calling setFastestInterval with slower value than setInterval

依然范特西╮ 提交于 2019-12-11 17:31:12
问题 In Google Play Location Services, in the LocationRequest class, is there any documented behavior to what happens when you use setFastestInterval with a value slower than the one set with setInterval ? What seems to happen, according to my test in 2 different phones, is that the updates are delivered to the listener at the (slower) rate set by setFastestInterval. However, there is an additional detail. If, for example, I call set setFastestInterval with 1 minute, but setInterval to 5 seconds,

Google Api is not giving location

泪湿孤枕 提交于 2019-12-11 08:36:35
问题 I am using google API to get location in my project. It gives location sometimes but most of the time it does not give any location. and from today it is giving server return an error 403 forbidden. When i am hitting the URL in my browser it is giving location. I am not using any key for my API can it cause this issue. Just to add- I get the lat and long from my api and then i get the location from google api and stores it in my database. What i am doing is:- public static string

LocationCallback not getting called

给你一囗甜甜゛ 提交于 2019-12-10 01:31:44
问题 I am making a location request using FusedLocationProviderClient . I have kept a timer for 30 seconds to check if location is received within that timeframe. Code is below: public void requestLocationUpdates() { initializeLocationRequest(); mFusedLocationProviderClient.requestLocationUpdates(mLocationRequest, mLocationCallback, null); startTimer(); } private void initializeLocationRequest() { mFusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(mContext);

how to change the location mode to “high accuracy/battery saving” form it default mode(device only)

隐身守侯 提交于 2019-12-09 06:29:10
问题 I'm trying to implement a google map for getting current location using this tutorial android google map tutorial The problem is ,It is not getting my current location untill I have started my device's google map and grant permission to access google location services. After this my application also get my current location. And it's working fine untill location is on in the device. And when location is turned off it's again need to started device's google map and grant permission for google

Unable to view current coordinates on button click in android studio

回眸只為那壹抹淺笑 提交于 2019-12-08 04:16:13
问题 I am creating an app which will get a user name from DB and print the ID and then on button click it will show the current GPS coordinates . I have implemented it but don't know why its not working. Here is my Manifest file <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS

Geofence transition PendingIntent blocked by the OS on Android Oreo

寵の児 提交于 2019-12-03 08:00:37
问题 This only happens on Android Oreo. I'm using Play Services 11.4.2. I'm registering geofences using the GeofencingClient and the addGeofences method with a pendingIntent to an IntentService that is handling geofence transitions. It looks like the intent sent by the play services is blocked by the OS in certain conditions. The system logs the following: Background start not allowed: service Intent { cmp=my.app.id/my.package.struct.GeofenceTransIntentService (has extras) } to my.app.id/my