Android SQLite issue

Hello,

I’m currently fixing a screen freezing issue which only happen on Android and I think it’s probably was caused by SQLite? The app is completed and running on IOS perfectly but not on Android, and I’ve been stuck with this bug for almost 2 weeks now. Base on what I have found so far, I reckon it’s the PreparedStatement stopping Android devices reading it and that’s why the screen freeze every time when I try to load my db.db. I just don’t know what went wrong with the SQL statement.

Please see my SQLite statements from below see if you guys can spot anything that is causing this issue? Thanks heaps!

createDB() {
    db.transaction(tx => {
      tx.executeSql(
        "CREATE TABLE if not exists time_log (id integer primary key not null, current_time text);"
      );
    });
  }

  clear() {
    db.transaction(
      tx => {
        tx.executeSql(
          "DELETE FROM time_log",
        )
      },
    );
  }

  update() {
    db.transaction(tx => {
      tx.executeSql(
        `SELECT * FROM time_log`,
        [],
        (_, { rows } ) => 
          [
          this.setState({ savedDate: JSON.stringify(rows['_array'][0]['current_time']) }),
          // console.log(rows),
          ]
      );
    });
  }

  save() {
    db.transaction( tx => {
        tx.executeSql(
          `INSERT INTO time_log (current_time) VALUES (?)`,
          [new Date(new Date().getTime() + 4*60*60*1000).toLocaleTimeString()],
        );
      },
    );
  }

Expo-sqlite version:

9.1.0

SDK version:

41.0.0