Forum Xamarin.Forms

XLabs and PCLStorage bug since Xamarin.Forms 2 update

KevinJalaisKevinJalais FRUniversity ✭✭

I'm developing a cross-platform application (PCL) which worked like a charm before i decided to update "Xamarin.Forms" and "Xamarin.Forms.Maps" from version 1.3 to version

Since that time, i just can't make working "XLabs" geolocation and "PCLStorage" libraries.

1) XLabs.Platform.Services.Geolocation.GetPositionAsync().
This method never respond and let app thread waiting during minutes before leaving the hand.

2) The simple use of the "PCLStorage" library crashes the whole app.

Thanks for your help.


  • KevinJalaisKevinJalais FRUniversity ✭✭

    I finally found the solution !

    I have a device running Android 6 Marshmallow (API 23).
    But as long as my compilation target was API 22, i ran the app under the Android 6 device perfectly and without any impact on the "old" android permission system.

    Update from Xamarin.Forms 1.x to 2.x force you to target Android API 23.
    Since you compile for Android API 23 you have to implement the new permission system with "Runtime Permissions".

    As i was under pressure to deliver a pre relsease version i missed that detail ... and the problems i described in my last post forced me to go back to Xamarin.Forms 1.x.

    By the way, i implemented the excellent Plugin.Permissions from @JamesMontemagno and everything works now.

    Netherless, if PCLStorage library and XLabs Geolocator had sent me any (explicit) error i would have avoid to waste my time.

    Hope it helps.

Sign In or Register to comment.