filmov
tv
Upgrading android camera intent app to nougat (7.0+) replacing File://Uri with content://Uris
![preview_player](https://i.ytimg.com/vi/9ZxRTKvtfnY/maxresdefault.jpg)
Показать описание
For those of you who are using devices using android OS version 7.0 or later the camera intent application will fail. This is due to how android now enforces how files are shared from one application to another.
Applications now have to implicitly specify which files can be spared to other applications. This is done by creating a content:Uris which have temporary sharing permissions.
The android FileProvider is used to specify which files can have temporary sharable permissions applied to them.
Github details:
The code is now on github you can get it from here
or else run this command
In this tutorial we will cover:
- Adding the provider to the android manifest
- How to get the package name in the android manifest
- Adding meta-data to specify the files with shareable permissions
- Creating a filepaths xml file
- How to get the package name in source
- Creating a content:Uri using the FileProvider
API's covered:
- getApplicationContext().getPackageName()
Youtube playlist:
Website series:
Disclaimer - The only support provided on this channel which includes questions, will be submission of suspect bugs that are reproducible on android Nexus hardware on the github code base.
For much more information checkout
Комментарии