My PhoneGap app is running smoothly on iOS and most Android devices, but I'm encountering an issue specifically with Samsung Galaxy S3 and S4.
Upon the initial page load, the app creates a local SQL database to store question and answer values. However, on the Samsung devices, the database fails to load properly the first time the app is launched. Subsequently, if the user exits the app completely and relaunches it, the database is created without any errors. Since the first page of the app requires users to input their age, which is then stored in the SQL database, they are mistakenly assuming that the app has frozen at this stage.
The database initialization code is as follows:
index.html
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
populateDB();
}
...
Following the age_button_pressed
function, there is no further progress and the database does not update accordingly.
This issue seems to be specific to Samsung Galaxy S3 and S4, leading me to speculate whether Samsung's WebKit is contributing to the problem.