Closed LiamLamb closed 5 years ago
Please can you tell us in which Android version it happens?
Sure - We're running this application targetting Oreo
@LiamLamb Yes I do need more detailed logs as I don't have that particular device, do you have any?
Hi @siralam and @EmmanuelGuther , Here are some details to help you reproduce the error. I would like to first give a bit of context as to what development environment we are in, what we are using etc.
We are developing an application as part of a cross platform project, using MvvmCross in Xamarin. All of the following code is therefore my interpretation into c#, which to be fair didn't really need much interpreting.
Android Environment Settings:
The permissions currently prompt on install are:
Steps that i've taken to setup the Image Picker on Android:
<provider android:name="android.support.v4.content.FileProvider" android:authorities="PACKAGENAME.fileprovider" android:exported="false" android:grantUriPermissions="true"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths"/> </provider>
`<?xml version="1.0" encoding="utf-8"?>
I think there is a better way to convert Uri into byteArray.
For me, I usually turn the Uri into a File
before I start working with it, so the File
class looks promising to me, I think this SO post might help you, could you try with it first?
Strange way. Why not use contentResolver.query(//...) for to get a string file path?
Hi @siralam,
I'm using your plugin for an application that should support users to take picture and upload them to a server. Your plugin tool works great - but i have noticed a few small 'compatibility' issues when i comes to selecting images from the gallery on certain devices.
We develop on a number of devices, but Samsung generally seems to show the most amount of issues when it comes to working with the camera / gallery in general. The picker works fine on one of our Samsung devices (SM-G360F), but has issues on one of our later devices: Samsung Galaxy A5 (2017). The issues tends to be that it can't resolve the path of the selected image. Do you have any suggestion on how to fix this ?
I can send you more details about replicating the issue if you like, as well as some detailed error logging if that helps ?
I look forward to hearing from you.
Liam