0

I have a json file in assets.

I am using org.json as parser.

If I always validate the json-file before upload and test it on the phone and it works, can I be sure that it will always work then or do I need to handle the case where the parsing or file opening fails. Can the file become corrupted?

Go to a bug activity/fragment that tells the user to reinstall the app if it happens?

user3591115
  • 383
  • 1
  • 3
  • 9
  • 1
    **"Can the file become corrupted?"** No. The assets directory is packaged with the app APK. If the assets directory was corrupted then your app itself would have had to be corrupted and it's unlikely it would run at all. – Squonk Jul 03 '14 at 19:55

1 Answers1

0

No, assets file cannot just become corrupted.

smuk
  • 321
  • 2
  • 12