0

Is there a way of count the number of SQLite Databases in my app without the need of inform their names? I need to make the following thest:

If there is one or more Databases in the app, I want to direct the user to the login screen, if not, send him to a sync screen where he informs some personal data and the database is downloaded from my webservice.

Ps: The app is a remote version of a web based system, and unfortanatly it needs to have one database per user and it's name isn't the same for everyone.

Rafael
  • 1,437
  • 6
  • 23
  • 41
  • If the database has the same name then you can be sure that there will only be one of that database – Bhargav Jan 10 '16 at 13:24
  • Thanks for the answer, but no, the name isn't the same for everyone... – Rafael Jan 10 '16 at 13:26
  • IF have have the db names, you can check if db with that name exists like so http://stackoverflow.com/a/3386736/4128945 – Bhargav Jan 10 '16 at 13:30

1 Answers1

0

After the answers I've decided to create a standard database saving the user ID and name, so if it's empty the app opens the login screen, if not it opens the sync screen.

Rafael
  • 1,437
  • 6
  • 23
  • 41