title: Create and Write to text file targeting Android 11
body: <p>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.</p>
  <p>Is it a proper way to go by the <a href="https://developer.android.com/training/data-storage/shared/documents-files" rel="nofollow noreferrer">Official Docs</a> 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.</p>
  <p>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 <a href="https://stackoverflow.com/questions/48638964/firebase-crashlytics-custom-log-does-not-appear-in-the-console">reference</a> I used for logging using Crashlytics.</p>
  <p>Any Suggestions?</p>