You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even after giving run time permission in android the camera gets crash in Nougat android
08-17 17:43:07.567 23211-23211/com.awesomeproject E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.awesomeproject, PID: 23211
android.os.FileUriExposedException: file:///storage/emulated/0/DCIM/RxGalleryFinal/IMG_20180817174307.jpg exposed beyond app through ClipData.Item.getUri()
at android.os.StrictMode.onFileUriExposed(StrictMode.java:1958)
at android.net.Uri.checkFileUriExposed(Uri.java:2356)
at android.content.ClipData.prepareToLeaveProcess(ClipData.java:941)
at android.content.Intent.prepareToLeaveProcess(Intent.java:9735)
at android.content.Intent.prepareToLeaveProcess(Intent.java:9720)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1609)
at android.app.Activity.startActivityForResult(Activity.java:4472)
at android.support.v4.app.BaseFragmentActivityApi16.startActivityForResult(BaseFragmentActivityApi16.java:54)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:67)
at android.support.v4.app.ActivityCompat.startActivityForResult(ActivityCompat.java:152)
at android.support.v4.app.FragmentActivity.startActivityFromFragment(FragmentActivity.java:798)
at android.support.v4.app.FragmentActivity$HostCallbacks.onStartActivityFromFragment(FragmentActivity.java:907)
at android.support.v4.app.Fragment.startActivityForResult(Fragment.java:1028)
at android.support.v4.app.Fragment.startActivityForResult(Fragment.java:1017)
at cn.finalteam.rxgalleryfinal.ui.fragment.MediaGridFragment.openCamera(MediaGridFragment.java:444)
at cn.finalteam.rxgalleryfinal.ui.fragment.MediaGridFragment.onItemClick(MediaGridFragment.java:365)
at cn.finalteam.rxgalleryfinal.ui.widget.FooterAdapter$1.onClick(FooterAdapter.java:43)
at android.view.View.performClick(View.java:6256)
at android.view.View$PerformClick.run(View.java:24701)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
The text was updated successfully, but these errors were encountered:
Even after giving run time permission in android the camera gets crash in Nougat android
08-17 17:43:07.567 23211-23211/com.awesomeproject E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.awesomeproject, PID: 23211
android.os.FileUriExposedException: file:///storage/emulated/0/DCIM/RxGalleryFinal/IMG_20180817174307.jpg exposed beyond app through ClipData.Item.getUri()
at android.os.StrictMode.onFileUriExposed(StrictMode.java:1958)
at android.net.Uri.checkFileUriExposed(Uri.java:2356)
at android.content.ClipData.prepareToLeaveProcess(ClipData.java:941)
at android.content.Intent.prepareToLeaveProcess(Intent.java:9735)
at android.content.Intent.prepareToLeaveProcess(Intent.java:9720)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1609)
at android.app.Activity.startActivityForResult(Activity.java:4472)
at android.support.v4.app.BaseFragmentActivityApi16.startActivityForResult(BaseFragmentActivityApi16.java:54)
at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:67)
at android.support.v4.app.ActivityCompat.startActivityForResult(ActivityCompat.java:152)
at android.support.v4.app.FragmentActivity.startActivityFromFragment(FragmentActivity.java:798)
at android.support.v4.app.FragmentActivity$HostCallbacks.onStartActivityFromFragment(FragmentActivity.java:907)
at android.support.v4.app.Fragment.startActivityForResult(Fragment.java:1028)
at android.support.v4.app.Fragment.startActivityForResult(Fragment.java:1017)
at cn.finalteam.rxgalleryfinal.ui.fragment.MediaGridFragment.openCamera(MediaGridFragment.java:444)
at cn.finalteam.rxgalleryfinal.ui.fragment.MediaGridFragment.onItemClick(MediaGridFragment.java:365)
at cn.finalteam.rxgalleryfinal.ui.widget.FooterAdapter$1.onClick(FooterAdapter.java:43)
at android.view.View.performClick(View.java:6256)
at android.view.View$PerformClick.run(View.java:24701)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
The text was updated successfully, but these errors were encountered: