Android App Development
iOS App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
As I was working with the camera app trying to get the image URI from it. My app crashed and I was not able to open the camera. This was happening in the devices which as API level greater than 24. The code works fine for lesser API levels.
The actual problem was the way in which I was trying to manage files from one app (the main app) to the other (the camera app, which is a server app). The old file Uri scheme is banned for the apps with targetSDKVersion of 24 and higher.
The solution to this issue is that the developer should use a File Provider in order to manage files from one app to another. You can follow the below steps to resolve this issue.
1) Add a provider in the “AndroidManifest.xml” file
2) Define a “provider_paths.xml” file under your “xml” folder in “res” folder.
3) And in your activity you can replace
to
Or you can use both as
That’s all !!! Just follow these simple steps and you are good to go.
Thank you very much. This is Vedesh Kumar signing off.
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
We've bought a Shopware Extension which is a hybrid App, which we can now offer in the Google Play Store and the IOS App Store. I'am still impressed how fast and how sharp the support team leads us through every process of the App-Store clarification. Very fast and useful response.
Markus Walter
Founder, Das Apartment Living
USA
India
Global
Name
Email
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.