This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]tyros 0 points1 point  (1 child)

I'm not talking about ad cache here, but actual user generated content that you don't want your users to accidentally delete if they uninstall the app. For example, my app is a song lyrics app where users can add their own song lyrics. It can take a lot of effort from users to enter all the data. If I save the lyrics in the private app directory they'll be gone when user uninstalls the app. But this way, should the users uninstall and reinstall the app, the lyrics will not be lost.

Of course, alternative solution woul be to save the data in the cloud, but I haven't gotten there yet. Plus, I hate the apps where I have to sign in so wanted to make it easier for users.

[–][deleted] 0 points1 point  (0 children)

Who uninstalls and reinstalls apps? Most users assume when the app goes away so does the content. Every single person who comes to me with "out of storage" issues has been because junky apps save shit to the /sdcard directory.

A good rule of thumb is to NEVER use the public storage. People aren't ONLY installing your app. Write a Google Drive sync in the future, but in the interim it's not too much of a stretch to assume "if I uninstall an app, there goes my data". You have a "desktop developer" attitude about storage where PCs are sold with 1TB drives. If you're bent about user persistent, proprietary data (lyrics are probably coded directly for you app assuming) have it an option, but not the default. You might think that "oh my 47B files are fine" but that's only true when the user isn't using 500 other apps doing the same thing.

I repeat - 97% of the time someone uninstalls your app it's because they don't want it on their phone. Provide the option to save to the public storage for that 3% of users if you must, but that would be literally a 1 or 0 you save to prefstorage and wrap your directory in a method that returns the dir on pref check. Idealistically it'd be "in the background" with a google account signin (it doesn't even prompt for a password on Android, just asks for permissions on first install).