Assigned
Status Update
Comments
8b...@gmail.com <8b...@gmail.com> #2
Also got these Event Log in Android Studio. Maybe related?
Emulator: INFO: QtLogger.cpp:68: Critical: Uncaught TypeError: Cannot read property 'update' of undefined (qrc:/html/js/location-mock-web-channel.js:130, (null))
Emulator: %android-sdk%\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: icmpv6 ICMP6_ECHO_REQUEST failed
Emulator: INFO: QtLogger.cpp:68: Critical: Uncaught TypeError: Cannot read property 'update' of undefined (qrc:/html/js/location-mock-web-channel.js:130, (null))
Emulator: %android-sdk%\emulator\qemu\windows-x86_64\qemu-system-x86_64.exe: icmpv6 ICMP6_ECHO_REQUEST failed
Description
Android Studio Version: 4.0.0-2
Emulator Version (Emulator--> Extended Controls--> Emulator Version): 30.1.5-6855416
HAXM / KVM Version: WHPX 10.0.19041
Android SDK Tools: 26.1.1
Host Operating System: Windows 10 Pro
CPU Manufacturer: Intel CPU
Inside a VM
64-bit CPU
RAM: 16242 MB
GPU: GPU #1
Make: 10de
Model: NVIDIA GeForce GTX 1650
Device ID: 1f91
Build Fingerprint:
AVD Details: Name: Pixel_3a_API_30_-_Baxter.Tester.1
CPU/ABI: x86
Path: C:\Users\Ben\.android\avd\Pixel_3a_API_30.avd
Target: google_apis_playstore [Google Play] (API level 30)
Skin: pixel_3a
SD Card: 512 MB
AvdId: Pixel_3a_API_30_-_Baxter.Tester.1
PlayStore.enabled: true
avd.ini.displayname: Pixel 3a API 30 - Baxter.Tester.1
avd.ini.encoding: UTF-8
disk.dataPartition.size: 2G
fastboot.chosenSnapshotFile:
fastboot.forceChosenSnapshotBoot: no
fastboot.forceColdBoot: no
fastboot.forceFastBoot: yes
hw.accelerometer: yes
hw.arc: false
hw.audioInput: yes
hw.battery: yes
hw.camera.back: virtualscene
hw.camera.front: emulated
hw.cpu.ncore: 4
hw.dPad: no
hw.device.hash2: MD5:0e6953ebf01bdc6b33a2f54746629c50
hw.device.manufacturer: Google
hw.gps: yes
hw.gpu.enabled: yes
hw.gpu.mode: auto
hw.initialOrientation: Portrait
hw.keyboard: yes
hw.lcd.density: 440
hw.lcd.height: 2220
hw.lcd.width: 1080
hw.mainKeys: no
hw.ramSize: 1536
hw.sdCard: yes
hw.sensors.orientation: yes
hw.sensors.proximity: yes
hw.trackBall: no
image.sysdir.1: system-images\android-30\google_apis_playstore\x86\
runtime.network.latency: none
runtime.network.speed: full
showDeviceFrame: yes
skin.dynamic: yes
tag.display: Google Play
vm.heapSize: 256
Steps to Reproduce Bug:
The emulator Location is set to travel along a route, so that the Location data is always changing.
The app will request for Location data (in the background) when it is triggered by a FCM.
The app does this by having a Service that extends FirebaseMessagingService to handle FCM.
When it receives the triggering FCM, it starts a IntentService that access Location Data (via LocationManager.requestSingleLocation).
The user has granted the app ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION, and ACCESS_BACKGROUND_LOCATION permissions.
The IntentService has foregroundServiceType="location" in manifest.
The IntentService is promoted to foreground (via startForeground) before requesting for location.
Expected Behavior:
The Location Data should represent the point on the route, at time of request.
Observed Behavior:
The Location Data has the correct time (et) property, but lat/lng is incorrect. It is always the same.
Below is the Logcat output
```
2020-11-13 08:59:54.739 7563-7640/
2020-11-13 08:59:54.740 7563-7640/
2020-11-13 09:00:04.668 7563-7704/
2020-11-13 09:00:04.668 7563-7704/
2020-11-13 09:00:22.435 7563-7756/
2020-11-13 09:00:22.437 7563-7756/
2020-11-13 09:00:31.177 7563-7797/
2020-11-13 09:00:31.177 7563-7797/
2020-11-13 09:00:40.984 7563-7838/
2020-11-13 09:00:40.984 7563-7838/
```
Special Notes:
In Android 10, the app retrieves the correct Location data while in the background.
In Android 11 emulator, if another app accesses location data and is running in the foreground, eg: Google Maps. Then the app gets the correct location data in while in the background.