Search Issue Tracker
Fixed in 2022.2.X
Fixed in 2020.3.X, 2021.2.X, 2022.1.X
Duplicate in 2021.2.X
Votes
14
Found in
2019.4
2020.3
2020.3.22f1
2021.2
2022.1
Issue ID
1379467
Regression
No
[Android] Input.location.Start doesn't update on android 12
Reproduction steps:
1. Open the attached user's project "LocationTest.zip"
2. Build for Android
3. Observe Latitude and Longitude not updating
Expected result: Input.location.Start updates Latitude and Longitude on android 12
Actual result: Input.location.Start doesn't update Latitude and Longitude on android 12
Reproduces on: 2019.4.32f1, 2020.3.23f1, 2021.2.2f1, 2022.1.0a12
Could not test 2022.1.0a13 and up due to another issue preventing User Permission Dialogs from showing up
Reproduces on these devices:
VLNQA00263 - Google Pixel 3 (Pixel 3), OS: 12.0.0, CPU: Snapdragon 845, GPU: Adreno 630
Does not reproduce on these devices:
VLNQA00231 - HUAWEI Mate 20 Pro (LYA-L29), OS: 9.0.0, CPU: HiSilicon Kirin 980, GPU: Mali-G76
N/A, Samsung Galaxy S9 (SM-G960F), Android 8.0.0, CPU: Exynos 9 Series 9810, GPU: Mali-G72
VLNQA00318 - OnePlus 7 Pro (GM1913), OS: 9.0.0, CPU: Snapdragon 855 SM8150, GPU: Adreno 640
Notes:
-User mentioned that the issue does not reproduce also on Android 11
-Do note that the default "desiredAccuracyInMeters" and "updateDistanceInMeters" in the project is 10 meters
Additional Information:
This bug in which the location information is not updated on Android 12 originated from Google, as you can see in this link(https://issuetracker.google.com/issues/215186921).
To save power when it is possible, Unity uses "GetBestProvider" which returns GPS_PROVIDER on Android 11 and earlier versions and returns FUSED_PROVIDER on Android 12.
Google says it will be fixed in Android 13, so we will register GPS_PROVIDER explicitly when the application running on Android 12 needs more accurate locations.
-
FunRobDev
Sep 05, 2022 06:37
Not yet fixed in 2019.4.38f1, so why is this issue closed then?!
-
bfischlin
Mar 22, 2022 15:35
Can confirm it working on a Pixel 6 with the latest Android 12 (February 2022) and Unity Version 2022.1.0b12
-
lukeholmes86
Mar 17, 2022 16:27
In our case we updated to Unity 2022.1.0.b11 on a google pixel 4 and installed the latest released android security patches (available from Tuesday 8th March, discussed in the below google tracker reference and this has resolved the gps problem. I noticed some strange behavior whilst our app was initially launching (a few seconds of the player object seemingly trying to be placed) but this could be local to us.
215186921
-
SEVO
Mar 09, 2022 09:25
Hello, we upgraded to Unity 2021.2.14f1 in the hopes of getting this fix, but a test of the new builds on an Android 12 phone (Pixel 5) appeared to still suffer from slow GPS position updates. Our tester reported that running another location based service (Google Maps) in the background helped a little.
-
SEVO
Mar 07, 2022 10:33
Which build exactly is this issue fixed in in the 2021.2.x series? We are looking through the patch notes and cannot see issue 1379467 listed in fixes.
-
staayio
Mar 01, 2022 14:46
Hi! Thanks for the update!
Just one question: Were you able to fix the problem by using a workaround that does not require an updated Android S version? Or is the problem in Unity only fixed when user are running a fixed Android S?
Thanks for information!
-
staayio
Jan 27, 2022 17:06
Any news on that issue? We run a location-based app and it is not working properly on different Android 12 devices. As lots of manufacturers are rolling out A12 at the moment, we get increasing amounts of users that cannot use our app any more.
-
Sherlore
Dec 17, 2021 03:56
Reproduces on:
SP1A.211105.003 Google Pixel 5 (Pixel 5), Android 12, CPU: Snapdragon 765G, GPU: Adreno (TM) 620Notes:
-This device was OK when Android 11, starts to suffer the location issue after updating to Android 12.
-Using Android.Permission.RequestUserPermissions to request Permission.CoarseLocation, Permission.FineLocation at same time could get Precise Location Permission but still suffers the issue.
-Besides the issue of not updating, location may also gets updating but very unstable (keep jumping everywhere)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on ScriptableRenderLoopDraw when rendering a specific VFX in Play Mode
- The script is not renamed in the Project window when renaming and a compilation Error is present
- Average FPS in Play Mode degradation on a newly created BiRP project when it's upgraded from 2020.3.48f1 to a newer Editor version
- DecoratorDrawer indentation is incorrect when it is called with EditorGUI
- "Unable to get the list of approved APIs." is thrown when testing the App Packages with Windows App Certification Kit
Resolution Note (fix version 2022.2):
Fixed in 2022.2.0a6
Resolution Note (fix version 2022.1):
Fixed in 2022.1.0b11
Resolution Note (fix version 2021.2):
Fixed in 2021.2.15f1
Resolution Note (fix version 2020.3):
Fixed in 2020.3.31f1