onCreate()
is called when you call getWritableDatabase()
or getReadableDatabase()
on the helper and the database file does not exist. If the file is already there and the version number is the requested one, no callback such as onCreate()
is invoked.
For what it's worth, it's also a bad idea to catch exceptions in onCreate()
. If the method returns successfully (doesn't throw), the framework thinks the database was created successfully.