0

I'm developing an android wifi localization app that uses a grid approach, where you select a grid tile and then it scans and collects all of the BSSIDs and RSSI values nearby that point and saves them along with the x,y coordinate of that grid tile.

What would be the best way to save that data? Should I use an sql database or would creating a text file be better?

This is a rough sketch of the data I need to save.

RadioMap: {
“filename”: String,
“points(list)”: {
    “x”: Int,
    “y”: Int,
    “collections(list)”: {
        “BSSID”: String
        “RSSI”: Int
        }
    }
}
Tommy Jackson
  • 609
  • 7
  • 20

2 Answers2

1

It depends on the interactions which you are going to have with those data.

For example if you want to search through stored data and query some of the saved data or you want to do data manipulation on the same android application, I would suggest SQLite db. I would suggest file:

  • If you want to use your android device as a simple data collector and then you want to process this data on another application on the same device so saving file on device storage would be a good mechanism to share data among data collector application and data processing application
  • If you want to use collected data on another device such as a PC running a windows application/Matlab and if it would be easier for you to grab data from your phone by means such as USB cable or memory card reader. If your data processing application can directly manage connections on USB port, you can also use SQLite db, and you can serialize your data through USB port but all of these options depends on your situation and your application.

You can have a look at this answer as well.

VSB
  • 9,825
  • 16
  • 72
  • 145
1

It is all about the complexity of your data and its size. Having said that, your data is complex enough so I would go for a database. You do not need to use SqlLite directly, you have frameworks that will simplify its implementation. You can use room (framework made by google which use SqlLite underneath) or Realm.

cherif
  • 1,164
  • 1
  • 11
  • 16