My camera code is working in all Android versions but in Nougat 7.0 it gives the following error:
java.lang.NullPointerException: Attempt to invoke virtual meth
This might be related to the change in Nougat which doesn't allow "file://" scheme to be attached to an intent.
Check out this blogpost for more details
https://inthecheesefactory.com/blog/how-to-share-access-to-file-with-fileprovider-on-android-nougat/en