Search code examples
androidlistfilesaveandroid-sdcard

How to display data that was saved in android


I am working on a project in which I am saving data in a class with a filename and data attached to a folder on the sdcard. I need another class to display a list of all the filenames and when you click on them it opens the saved data (text) in an editor or something. I am somewhat new to android, sorry if I am missing something obvious here.

So basically I need to display the file names of data that I have saved in a list view and when you click on them, it takes the data and sends it (Probably using shared prefs or BroadcastReceiver) to a class where you can edit it. I could also use a database if that would be easier.


Solution

  • See First way is to make variable as static so you can access by class name.
    second Use file for data storage it is easy to create file.
    third is use Share preference i.e.mobile seeting
    fourth you can use SQlite to store data.