I am trying to create a file and write to it in the external directory. Due to scoped storage restriction in Android 11 I am not able to find a way to do it. The purpose of creating and writing to the file is just to log the data which I need and later view it using a file explorer or send to a specific mail.
Is it a proper way to go by the Official Docs even for logging the required data or is there any other recommended way to do it? As per the official docs It looks like it will prompt the user for the action but I feel it would be a bit odd using it for logs.
I have already tried the Crashlytics way of logging but it doesn't seem to appear in the Crashlytics of Firebase Console. Here is a reference I used for logging using Crashlytics.
Any Suggestions?