0

i am use phonegap and onsen-ui for create mobile application.

i want check sqlite database is exist or no. if database is not exist navigate to setting page else navigate to main page

how to solve this problem?

Thank you and sorry for my poor english.

  • Do you use Cordoa-SQLitePlugin? Check the window.sqlitePlugin and the window.sqlitePlugin.openDatabse are defined. or? – KNaito Jul 25 '14 at 08:32
  • i use this page http://docs.phonegap.com/en/3.0.0/cordova_storage_storage.md.html#Storage for create database and table now need check this database is exist – Sadegh Bakhshandeh Sajjad Jul 25 '14 at 08:35

1 Answers1

0

Create the plugin for Android and iOS and check via the plugin if the SQLite target file exist or not.

In case of Android, this post would help you.

In Android, check if sqlite database exists fails from time to time

In iOS this post would help you.

iPhone, sqlite3, how can I determine is a table exists already in a few lines of code as possible?

Community
  • 1
  • 1
Ataru
  • 544
  • 4
  • 7