Status Update
Comments
ap...@google.com <ap...@google.com> #2
// Write the file
OutputStream outputStream = getContentResolver().openOutputStream(currentUri);
OutputStreamWriter outputStreamWriter = new OutputStreamWriter(outputStream );
Actually the problem seems to be with ParcelFileDescriptor.AutoCloseOutputStream . I can get the code above to work fine if I don't use getContentResolver().openOutputStream(currentUri) , which returns a ParcelFileDescriptor.AutoCloseOutputStream .
If I use:
// Write the file
FileOutputStream fos = new FileOutputStream(new File(getFilesDir(), "out.txt"));
OutputStreamWriter outputStreamWriter = new OutputStreamWriter(fos);
it WORKS correctly on any API level.
But as I am using external storage and have to use the ContentProvider given when I get access to the storage via a chooser, all I have to deal with is a content Uri and not a file name nor file handle. I have to go through the getContentResolver methods.
Note that:
// Write the file
ParcelFileDescriptor pfd = getContentResolver().openFileDescriptor(currentUri, "w");
FileDescriptor fd = pfd.getFileDescriptor();
FileOutputStream fos = new FileOutputStream(fd);
OutputStreamWriter outputStreamWriter = new OutputStreamWriter(fos);
Does not work either. Somewhere in the ParcelFile system things are going wrong.
il...@google.com <il...@google.com> #3
Thank you for reporting this issue. We just need a few things for us to further investigate this issue:
Please fill out each question and comment, thank you.
-
Have you observed this bug on Pixel devices as well?
-
Android Build Version (go to Settings > About Device > Build Number (hold down to copy))
-
Android Device Model:
-
If possible, capture the issue in a screen recording (desktop and/or phone capture).
-
Upload the full bug report file after the issue has occurred. Steps followed here:
https://developer.android.com/studio/debug/bug-report -
Please provide a simple sample project (exported zip Android Studio file) that reproduces the issue. This gives us the closest test environment to yours and allows us to inspect the code/structure used which will help analyze your issue.
-
Steps to reproduce issue specific to the provided sample project: [Be as specific as possible]
- 1
- 2
- 3
-
Expected Results:
-
Observed Results:
Note: Please upload to google drive and share the folder to
The more information we have, the more accurately our product and engineering team can solve the issue. Thank you so much for your time and for your cooperation.
Description
Component used: Navigation Version used: 2.3.0-beta01
The error message when you navigate to an unknown destination/action id is
It would be helpful if it also included what your current destination is so that it would be easier to debug where you are on the navigation graph and why the destination/action ID you expected to be visible is no longer found.