How to test with Android Emulator?
tsuga opened this issue · 1 comments
tsuga commented
Your Environment
- Plugin version: 3.1.0
- Platform: Android (on Emulator)
- OS version: Android 11.0 (on Emulator, with API 30)
- Device manufacturer and model: Google Pixel 4 (on Emulator)
- Running in Simulator: Yes
- Cordova version (
cordova -v
): - Cordova platform version (
cordova platform ls
): - Plugin configuration options:
- Link to your project:
Context
I'm testing the code on the README with Android Emulator.
Expected Behavior
It should update locations when the app goes into the background.
Actual Behavior
I can see following outputs in the Logcat when I put my app into the background.
D/com.tenforwardconsulting.bgloc.DistanceFilterLocationProvider: Location change: Location[gps 33.340862,132.278377 hAcc=5 et=+18783d11h13m43s367ms etAcc=+1ms alt=0.0 vel=0.0 bear=0.0 vAcc=1 sAcc=1 bAcc=30 {Bundle[mParcelledData.dataSize=96]}] isMoving=false
I/com.tenforwardconsulting.bgloc.DistanceFilterLocationProvider: startMonitoringStationaryRegion: lat=33.34086166666666 lon=132.27837666666666 acy=5.0
D/com.tenforwardconsulting.bgloc.DistanceFilterLocationProvider: Entering stationary region
D/AudioTrack: createTrack_l(0): AUDIO_OUTPUT_FLAG_FAST denied by server; frameCount 882 -> 1956
D/com.marianhello.bgloc.service.LocationServiceImpl: New stationary BGLocation[gps 33.340862,132.278377 id=null acc=5 t=1622891622366 et=+ë83d11h13m42s366ms alt=0.0 vel=0.0 bear=0.0 radius=5.0 {Bundle[mParcelledData.dataSize=96]} locprov=0]
D/com.marianhello.bgloc.BackgroundGeolocationFacade: Received MSG_ON_STATIONARY
However, after this, I don't see any updates even if I change the location by Emurator's Extended control.
Possible Fix
I assume that the location update is not fired because the device's accelerometer metrics remain the same. But it is the limitation by the Emulator. Is there any way to test without a physical android device?
crhistianramirez commented