question

pekspro avatar image
0 Votes"
pekspro asked pekspro commented

OneDrive for Android can corrupt text files

I have created an app for Android where users could create lists of words (https://play.google.com/store/apps/details?id=com.pekspro.vokabel). These lists are stored as files. The user is using the "file picker" in Android to select which file to use. In this file picker you could select to open files from OneDrive. My app doesn't know where the file is located or if OneDrive or some other service is in use.

I have noticed that if you in my app remove some items and add some new items the file is getting corrupted. The app is storing all files in a text-based format. But this only happens when I work with files that are in OneDrive. Local files or files on Google Drive or Dropbox is not getting corrupted.

It is possible to replicate this issue in a simple text editor. For instance, these two:

https://play.google.com/store/apps/details?id=com.abhishek.oldschooleditor
https://play.google.com/store/apps/details?id=com.byteexperts.texteditor

I have also created a super simple editor myself just to demonstrate the issue:

https://github.com/pekspro/CorruptFileDemo

First, create a text file with this content on a computer and save it on
OneDrive:

A
B
C
D
E

Next, open the file in this app. Remove the last three lines, and add a new
line:

A
B
1

Save the file. Then open it again, either in the app or on a computer. The
content will now be:

A
B
1
D
E

I have tested this in OneDrive for Android version 6.41. I have used both in Android 8 and Android 10 with different accounts and devices.

I have reported this earlier:

https://answers.microsoft.com/en-us/msoffice/forum/all/onedrive-for-android-can-corrupt-text-files/b7f46dd1-35c9-4128-a3d7-0a8ad1b9c351

I have also been in direct contact with the support (case id: 1028245617) and after a lot of conversations I get referred here.


not-supported
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @pekspro,
Welcome to Q&A forum!
Please note that the tag office-onedrive-client-itpro focuses one general issues about OneDrive client, and issues related to OneDrive for Android are not supported in Q&A forum currently.
I would suggest that you refer to the following official KB for more professional support and help.
Troubleshoot OneDrive for Android app problems
Thanks for your understanding.

0 Votes 0 ·

This is where I come from. The support referred me to this forum. I try again.

0 Votes 0 ·

0 Answers