freshplanet / ANE-ImagePicker

Air Native Extension for mobile camera and gallery features (iOS + Android)
Apache License 2.0
80 stars 48 forks source link

Crashes on Android #70

Open trinoo1979 opened 2 years ago

trinoo1979 commented 2 years ago

Hello, thanks for this ANE. When try to run my project compiled (without any errors) using Adobe Animate, AIR 33.1.1.633 and your ANE downloaded from Bin folder (5.6 MB size) on a device (tested on Samsung Galaxy A7 with Android 11 and XPERIA Z1 Compact with Android 5), my application crashes immediately (and closes debug session silently without any error) when calling AirImagePicker.instance.displayCamera(500, 500). Included all imports to my project and also activities to app xml descriptor. tried to place some traces right before displayCamera() call:

trace(AirImagePicker.isSupported); //true trace(AirImagePicker.instance.getCameraPermissionStatus().value); //AUTHORISED

I use also your KeyoardSize ANE in the same projects and it works fine as well as another ANE using device camera - Barcode scanner ANE from MyFlashLabs - which also works fine. Any help or advice, where problem might be, please?

trinoo1979 commented 2 years ago

ANE from sample/libs folder works fine for me, but it does not contain all necessary platforms (64bit), its 4 yars old, please, please recompile it.

esdebon commented 1 year ago

Here contain all necessary platforms (64bit)

https://github.com/Fluocode/ANE-ImagePicker/tree/master/bin

requiere:

<provider
                        android:name="androidx.core.content.FileProvider" 
                        android:authorities="com.domainTest.app.fileprovider"
                        android:exported="false"
                        android:grantUriPermissions="true">
                        <meta-data
                            android:name="android.support.FILE_PROVIDER_PATHS"
                            android:resource="@xml/provider_paths"/>
                </provider>

Where:

com.domainTest.app

is the APP ID