0

I have an app that works with big lists of keymap values. Those lists change dynamically as new values are added and old values could be deleted, changed or just remain unchanged. To preserve the changes, I need to save the lists in files. If for example, I change only 1 value, what will Android do with the file to be saved? Which one of these conditions does actually happen? :

  1. Each command to overwrite an existing file will delete it and a new file is created from scratch? (Highly inefficient, undesired behaviour), or,

  2. Being the origin of data a clearly separated sequence of keymap values, Android can actually detect the little change, and will overwrite only the changed sector, leaving the rest of the file untouched? (If possible, this is the ideal procedure).

So which case does actually happen? Or better yet, can you recommend a good way to efficiently save the continously changing keymap data without overhead. Thanks

Carlos Botero
  • 319
  • 3
  • 11
  • 1
    That really depends how you implement it. – Ryan M Feb 06 '20 at 07:55
  • Yes. Android does nothing. You have to code all. But you could ask what is possible. Or if what you have in mind is codable. – blackapps Feb 06 '20 at 08:39
  • "That really depends how you implement it"... What? Can you actually modify the way that the Android OS saves files? My question is quite clear: how are these keymaps saved in the "hard disk" in Android: by deleting the previous keymap "version" and then writing the new keymap completely, or just updating the modified keyvalues. So? – Carlos Botero Feb 18 '20 at 09:00

0 Answers0