AND210 - Location Service App Not working on API 21 (Lollipop) for last exercise of lesson


The last exercise of AND210 (background services providing location to app) works correctly on KitKat API 19 4.4.2: fake locations trigger OnLocationChanged event in the LocationService class.

However, in Lollipop (at least in the Xamarin Android player, emulating a Nexus 7 API 22 5.1.0) the OnLocationChanged event is never raised. Location (both Coarse and Fine) is enabled in the emulator.

Does this mean that in Lollipop we have to use the newer "fused" Google API for location?



  • rene_ruppertrene_ruppert DEXamarin Team, University, XamUProfessors Xamurai

    I'm using the Samsung 5 image here in XAP with Lollipop and it works. However I have to admit that sometimes the simulated location updates don't trigger. Typically a reboot or fresh installation of the image solves it.

  • RiccardoMoschetti.1881RiccardoMoschetti.1881 ITMember, University
    edited March 2016

    Thanks for your help. I rebooted multiple times, no luck. I only have Nexus images on my XAP, so I couldn't say if Samsung images are very different (on Android Forums, some devs report that location triggering errors are very device-specific). I will try to reinstall a Lollipop image.

Sign In or Register to comment.