There is, in fact, a small, minor change in the Permissions for applications running and oriented on API 26.
Previously, applications were automatically granted all permissions in this group if the user granted at least one permission in this group. This means that an application that was provided with READ_EXTERNAL_STORAGE would immediately be provided with WRITE_EXTERNAL_STORAGE , regardless of whether WRITE_EXTERNAL_STORAGE was explicitly requested.
As in Oreo, for applications oriented to API 26+, this has been fixed, and only those permissions that are explicitly requested will be granted. If the user has already granted permission in the same group, then there will be no invitation for a new permission, but he should still be requested.
That was the problem. When READ_EXTERNAL_STORAGE permission was granted to your application on Nougat or lower, you automatically received WRITE_EXTERNAL_STORAGE without requiring it specifically. When you try to perform the same procedure for saving a file in Oreo, you do not get WRITE_EXTERNAL_STORAGE automatically, so the record ultimately fails.
Just add a specific query for WRITE_EXTERNAL_STORAGE . If the user has already provided READ_EXTERNAL_STORAGE , they will not worry about another invitation. Alternatively, you can only query WRITE_EXTERNAL_STORAGE from the beginning, which implicitly includes READ_EXTERNAL_STORAGE , and saves you the need for two separate queries.
source share