1

I'm making an app where the user can choose a specific directory (or open in another app) and select files to import so the app can read it. Which storage option will be the best suited?

Shared Prefences, Internal Storage or External Storage? If you're wondering what I'm storing, it is a bunch of google map markers, all the information written into the file.

Thanks for your time.

Paul
  • 13,042
  • 3
  • 41
  • 59
J.Tey
  • 225
  • 4
  • 18

1 Answers1

0

If it is a file best can be a file in a hidden folder in internal Storage.

Why hidden folder ?

The content in the file is bunch of google map markers. So this file you must be using somewhere to read from that and use that marker data as per your needs in application.

If it is in some hidden folder user cannot find it and so that cannot delete it's contents (in normal cases excluding the case when user has enabled the option of Show hidden files & folders) & your application data is safe at some extent.

Why internal storage ?

As it is a none removable storage it can be more reliable not 100% but at least 80%. If you will do it in external storage and the SdCard gets removed then you might face FileNotFound or something similar to that.

Thing you may need : How to hide a folder in sdcard in android

Community
  • 1
  • 1
Janki Gadhiya
  • 4,492
  • 2
  • 29
  • 59