I have learned that a SqlLite Database.readTransaction is just not working on Android. If you rely heavily on databases like my app does, it's a big problem. So, you have to use Database.transaction.
I did not however want to lose the slight boost of readTransaction for those that support it, so I found a way around the problem:
FlashCards.Database = window.openDatabase("FlashCards", "1.0", "FlashCards Database",500000);
if (FlashCards.fetchAppInfo.os == "android"){
FlashCards.Database.safeTransaction = FlashCards.Database.transaction;
}else{
FlashCards.Database.safeTransaction = FlashCards.Database.readTransaction;
}
FlashCards.fetchAppInfo.os is my personal way of configuring the OS deployment. I had to store the transaction object inside the Database namespace in order for it to work (FlashCards.safeTransaction throws Illegal invocation error).
Then I just did a global find/replace on FlashCards.Database.readTransaction to change it to FlashCards.Database.safeTransaction.
Credit goes to Philip Davis for realizing it needs to be in the Database namespace.
0 · ·
Comments
- Spam
- Abuse
0 · Off Topic Insightful ·- Spam
- Abuse
0 · Off Topic Insightful ·@unwiredben Had not tested in the Android browser, but it seems to work fine. Looks like an issue with PhoneGap or the webview it's using. I'll do some more testing and get a good bug report ready.
- Spam
- Abuse
0 · Off Topic Insightful ·- Spam
- Abuse
0 · Off Topic Insightful ·- Spam
- Abuse
0 · Off Topic Insightful ·- Spam
- Abuse
0 · Off Topic Insightful ·