prudhvirajkumar10 / imagepickerdemo

This is just a demo of Image Picker through a FileProvider used in Nougat+ devices. It demonstrates how the image will get from camera and the image file path
21 stars 10 forks source link

Crash on Google Pixel running Android 7.1.2 #1

Open nicktmro opened 6 years ago

nicktmro commented 6 years ago

Thanks for sharing this project.

Upon running it on a Google Pixel / Android 7.1.2 I see that the Google Camera crashes:

E/AndroidRuntime: FATAL EXCEPTION: main
                                                 Process: com.google.android.GoogleCamera, PID: 7832
                                                 java.lang.SecurityException: Permission Denial: opening provider android.support.v4.content.FileProvider from ProcessRecord{f58a98d 7832:com.google.android.GoogleCamera/u0a63} (pid=7832, uid=10063) that is not exported from uid 10216
                                                     at android.os.Parcel.readException(Parcel.java:1684)
                                                     at android.os.Parcel.readException(Parcel.java:1637)
                                                     at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:4199)
                                                     at android.app.ActivityThread.acquireProvider(ActivityThread.java:5478)
                                                     at android.app.ContextImpl$ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2239)
                                                     at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1517)
                                                     at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:986)
                                                     at android.content.ContentResolver.openOutputStream(ContentResolver.java:744)
                                                     at android.content.ContentResolver.openOutputStream(ContentResolver.java:720)
                                                     at cuw.e(PG:18)
                                                     at cuw.b(PG:52)
                                                     at cka.b(PG:13)
                                                     at cka.a(PG:38)
                                                     at crd.a(PG:9)
                                                     at ghh.a(PG:17)
                                                     at com.google.android.apps.camera.shutterbutton.ShutterButton.performClick(PG:160)
                                                     at android.view.View$PerformClick.run(View.java:22429)
                                                     at android.os.Handler.handleCallback(Handler.java:751)
                                                     at android.os.Handler.dispatchMessage(Handler.java:95)
                                                     at android.os.Looper.loop(Looper.java:154)
                                                     at android.app.ActivityThread.main(ActivityThread.java:6121)
                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)

Any ideas why?

sivabe35 commented 6 years ago

Need to give Read&Write Storage permission.