freshplanet / ANE-ImagePicker

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

App crash when open camera on andriod 7 #62

Open drmms86 opened 6 years ago

drmms86 commented 6 years ago

Opening camera by calling displayCamera causes the app to crash on android 7

esdebon commented 5 years ago

Same problem

Caused by: android.os.FileUriExposedException:

at android.os.StrictMode.onFileUriExposed (StrictMode.java:1958)

at android.net.Uri.checkFileUriExposed (Uri.java:2356)

at android.content.ClipData.prepareToLeaveProcess (ClipData.java:944)

at android.content.Intent.prepareToLeaveProcess (Intent.java:10480)

at android.content.Intent.prepareToLeaveProcess (Intent.java:10465)

at android.app.Instrumentation.execStartActivity (Instrumentation.java:1616)

at android.app.Activity.startActivityForResult (Activity.java:4564)

at android.app.Activity.startActivityForResult (Activity.java:4522)

at com.freshplanet.ane.AirImagePicker.activities.CameraActivity.onCreate (CameraActivity.java:46)

at android.app.Activity.performCreate (Activity.java:7183)

at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1220)

at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2908)

Xgamefactory commented 5 years ago

these can be helpful to resolve this issue. https://stackoverflow.com/questions/39242026/fileuriexposedexception-in-android-n-with-camera https://stackoverflow.com/questions/44821017/fileuriexposedexception-using-android-7