cjlotz / Xamarin.Plugins

Cross platform Xamarin Plugins
MIT License
113 stars 56 forks source link

Error when I try to attach a pdf files #71

Closed gptucci closed 7 years ago

gptucci commented 7 years ago

Hi When I try to attach a pdf file in PCL I get Java.Lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.XmlResourceParser android.content.pm.PackageItemInfo.loadXmlMetaData(android.content.pm.PackageManager, java.lang.String)' on a null object reference at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <896ad1d315ca4ba7b117efb8dacaedcf>:0

Compiled using Android 8.0 Tnx

gptucci commented 7 years ago

Really stupid question Excuse me The issue is related to FileProvider Here the solution https://stackoverflow.com/questions/38200282/android-os-fileuriexposedexception-file-storage-emulated-0-test-txt-exposed

cjlotz commented 7 years ago

As noted in the README be sure to setup your app to make use of the FileProvider.