Search code examples
androidandroid-sqlitesqliteopenhelper

How to create table using sqlite fts5 in android?


I want to create a table using fts5 extension

CREATE VIRTUAL TABLE TABLE_FTS_FOOD_ITEM USING fts5 (content='food_items', Shrt_Desc, Energy_Kcal);

but I am getting this error.

android.database.sqlite.SQLiteException: no such module: fts5

Earlier I was using fts4 that was working fine. Can I use fts5 with sqLitedatabase in android?


Solution

  • FTS5 is not available before SQLite 3.9.0, and even then disabled by default, so it is unlikely to be part of any SQLite library shipped with Android.