• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Separate databases
#21
That approach is very similar in nature to just letting the user pick a database file to use as the active library. Unfortunately, there is a little bit of a snag if I try to provide different application settings per database. Google completely abstracted access to these files, so that you aren't really supposed to know where they are kept. You just go through their SharedPreferences classes and get/set values. That means that I can't easily change where these settings files are stored. This is true regardless of the approach I use for providing separate databases. If I wanted to keep separate settings for each database, one approach would be to copy all of the settings files into a directory that has to live at the same level as the database file, so that when you switch to that database file, I overwrite the current application settings with those ones. This doesn't work well if one of your databases is the one in the default location though, as those settings would be overwritten, so I would also have to automatically back up those settings when you switch away from the default location. Ultimately, I don't think all of that really matters though, as why would you want different settings per database? Wouldn't you want the same settings applied to all of your databases?

The simplest thing in my mind is to provide an option to select a different database file, and if some of the settings are important, these can be saved alongside the database file. I think each of these database files should be uniquely named so maybe I would have to think about how to handle that. As new databases are set up, the user can easily switch between existing databases in a list. If "Manage my Files" is off, users can pick where they want the database to be stored for each library. If it's on, the user can only provide names for each library, but they will all be created in the default storage location.

Thoughts?
Reply


Messages In This Thread
Separate databases - by sciurius - 06-02-2015, 08:36 PM
RE: Separate databases - by Snard - 06-03-2015, 12:33 AM
RE: Separate databases - by gerryfitz - 06-03-2015, 12:56 AM
RE: Separate databases - by Zubersoft - 06-03-2015, 02:13 AM
RE: Separate databases - by sciurius - 06-03-2015, 04:32 AM
RE: Separate databases - by Harry_M - 06-04-2015, 07:09 PM
RE: Separate databases - by sciurius - 10-26-2015, 01:28 AM
RE: Separate databases - by sciurius - 11-05-2015, 01:37 AM
RE: Separate databases - by Zubersoft - 11-05-2015, 05:42 PM
RE: Separate databases - by sciurius - 11-05-2015, 06:55 PM
RE: Separate databases - by Skip - 11-06-2015, 06:54 AM
RE: Separate databases - by jagny42 - 11-11-2015, 12:04 PM
RE: Separate databases - by sciurius - 11-11-2015, 05:13 PM
RE: Separate databases - by sciurius - 11-12-2015, 06:40 PM
RE: Separate databases - by Skip - 11-13-2015, 04:04 AM
RE: Separate databases - by jagny42 - 11-13-2015, 11:17 PM
RE: Separate databases - by sciurius - 11-13-2015, 08:33 AM
RE: Separate databases - by Zubersoft - 11-13-2015, 09:07 AM
RE: Separate databases - by sciurius - 11-13-2015, 05:44 PM
RE: Separate databases - by sciurius - 11-13-2015, 06:45 PM
RE: Separate databases - by Zubersoft - 11-14-2015, 04:35 PM
RE: Separate databases - by sciurius - 11-15-2015, 06:43 AM
RE: Separate databases - by Skip - 11-15-2015, 01:19 AM
RE: Separate databases - by chrisss - 12-02-2015, 01:20 AM
RE: Separate databases - by sciurius - 07-20-2017, 07:38 PM
RE: Separate databases - by BRX - 07-21-2017, 01:29 AM
RE: Separate databases - by Zubersoft - 07-21-2017, 12:55 PM



Users browsing this thread:
3 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2024 MyBB Group.