Status Update
Comments
fa...@gmail.com <fa...@gmail.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.
vi...@google.com <vi...@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.
vi...@google.com <vi...@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
vi...@google.com <vi...@google.com> #5
Thank you for providing your update. We just need a few things for us to further investigate this issue:
-
When attempting to reproduce the issue following your provided steps, the view is empty after selecting "Open table..." and choosing the provided .csv - where exactly are you observing the output text from the csv file? Thanks for your clarity.
-
Pixel 4 Emulator API 30: debug build variant
vv...@google.com <vv...@google.com> #6
4. Check the current contents of testCopy.csv now. It is corrupted.
Description
What
User experience
What type of issue is this?
Display or rendering issue
What type of Android issue is this?
Display or Rendering
What steps would let us observe this issue?
What did you expect to happen?
Message full showing with reply and other buttons
What actually happened?
Half of the message rendered only
What was the effect of this issue on your device usage, such as lost time or work?
High
When
Time and frequency
When did this happen?
Sep 22, 2024 5:06 PM GMT+05:00
How often has this happened?
Frequently
Where
Component
Suggested component: <not visible> (1630575)
Build and device data
- Build Number: google/shiba_beta/shiba:15/AP41.240823.009/12329489:user/release-keys
(Note: It is the build when sending this report. For exact build reference, please see the attached bugreport.)
- SoC Revision: Zuma B1
Related apps
WhatsApp
com.whatsapp
Version 241880004 (2.24.18.80)
Not system app
Debugging information
Google Play services
com.google.android.gms
Version 243633035 (24.36.33 (260400-675378931))
System App (Updated)
Android System WebView
com.google.android.webview
Version 661314633 (128.0.6613.146)
System App (Updated)
Network operator: Jazz
SIM operator: Jazz
Filed by Android Beta Feedback. Version (Updated): 2.45-betterbug.external_20240829_RC01 (DOGFOOD)https://developer.android.com/preview/feedback#feedback-app .
To learn more about our feedback process, please visit