Status Update
Comments
il...@google.com <il...@google.com>
jb...@google.com <jb...@google.com>
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.
cl...@google.com <cl...@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.
na...@google.com <na...@google.com> #4
<Android Build Version ?> My friend's phone is on Android 10. Emulators with API 29 and API 30 had the problem. My own phone and API 26 and API 28 emulators did not. Project compile SDK is API 30, tools version is 29.0.3.
<Android Device Model ?> My friend's device is a Samsung Galaxy S-10, model SM-G973U.
<If possible, capture the issue in a screen recording (desktop and/or phone capture).> Irrelevant.
<Upload the full bug report file after the issue has occurred> Irrelevant since this was run via emulator.
<Steps to reproduce issue specific to the provided sample project>
1. Copy testCopy.csv from the assets directory onto the phone somewhere or into an API 29 or greater emulator.
2. Start the app , click and choose menu "Open Table..."
3. Choose file "testCopy.csv" with the file chooser.
4. Check the current contents of testCopy.csv now. It is corrupted.
<Expected Results>
delimiter ,
debug true
Name,Pet,Email,Phone,Audio,Notes,Web
125,100,160,100,100,100,150
12
40
fullname,image,email,phone,audio,note,url
arreter[1],Clipboard01.jpg,lriehl@comcast.net,360-742-3631,sound1407360340825148972.aac,note1.txt,<Name>#
Audrey Oakes,Clipboard04.jpg,oakesa@comcast.net,253-639-3558,sound421577012195097098.aac,note3.html#58,Amazon#
Norm Oakes,Clipboard04.jpg,oakesn@comcast.net,253-639-3558,sound421577012195097098.aac,note2.html#3,
<Observed Results>
delimiter ,
debug true
Name,Pet,Email,Phone,Audio,Notes,Web
125,100,160,100,100,100,150
12
40
fullname,image,email,phone,audio,note,url
arreter[1],Clipboard01.jpg,lriehl@comcast.net,360-742-3631,sound1407360340825148972.aac,note1.txt,<Name>#
Audrey Oakes,Clipboard04.jpg,oakesa@comcast.net,253-639-3558,sound421577012195097098.aac,note3.html#58,Amazon#
Norm Oakes,Clipboard04.jpg,oakesn@comcast.net,253-639-3558,sound421577012195097098.aac,note2.html#3,
The error is that "
Sample project is at
Description
Component used: Navigation
Version used: 2.6.0-alpha05
After upgrading to Navigation 2.6.0-alpha05, swapping to another tab via a bottom bar set up via
NavigationUI
works the first time, but pressing the back button doesn't work as intended: while the fragment changes, the selected bottom bar item doesn't change.Sample project:https://github.com/muzei/muzei
Steps to reproduce:
Expected behavior: you go back to the 'Muzei' fragment and the selected tab updates.
Actual behavior: you go back to the 'Muzei' fragment, but the selected tab does not update.