Unfortunately the code runs very slow. On average it takes 1 second to execute.
Looking for ways to improve performance I wrote this new code:
B4X:
Sql1.BeginTransaction
Sql1.ExecNonQuery2("INSERT INTO GpsData VALUES(NULL,?,?,?,?,?)", Array As String(UnixTime, Lat, Lon, Speed, Bearing))
Sql1.EndTransaction
The code runs quickly. On average, the execution time is 50 thousandths of a second, but when reviewing the database, there is no data.
Neither on the phone nor in the log, there is a message of any error.
Sql1.BeginTransaction
Sql1.ExecNonQuery2("INSERT INTO GpsData VALUES(NULL,?,?,?,?,?)", Array As String(UnixTime, Lat, Lon, Speed, Bearing))
Sql1.TransactionSuccessful
Sql1.EndTransaction