web-sql

Sync indexedDB with mysql database

被刻印的时光 ゝ 提交于 2020-02-02 03:16:28
问题 I am about to develop an application where employees go to service repair machines at customer premises. They need to fill up a service card using a tablet or any other mobile device. In case of no Internet connection, I am thinking about using HTML5 offline storage, mainly IndexedDB to store the service card (web form) data locally, and do a sync at the office where Internet exists. The sync is with a MySQL database. So the question: is it possible to sync indexedDB with mysql? I have never

ionic 2 SQLite manage callback with Promise

白昼怎懂夜的黑 提交于 2020-01-17 05:53:33
问题 I want to get the callback of a successful SQLite transaction with Ionic 2. I am still currently learning the HTML5 Promise, and it is still a bit confuse. And since I've heavily used jQuery Deferred before, I try to adapt what I used to do with jQuery. Before Ionic 2, I used the following jQuery pattern to execute my async SQL: var SqlResult = function(sqlToExecute,bracketValues){ this.sqlToExecute = sqlToExecute; this.bracketValues =bracketValues; }; SqlResult.prototype

Cordova / Ionic database(Web SQL) disappears randomly

偶尔善良 提交于 2020-01-16 16:48:09
问题 A Cordova/Ionic app I've built is having a little trouble. The problem is only appearing on one user's phone (out of about 6 different phones) Essentially when randomly using the app, sometimes the user will return to the app to find the database / state is completely blank. I have a function that they can trigger to send me the entire db, and it's as if it just randomly resets itself. There is a single call to reset the database, but it is behind a yes/no prompt so I don't think it's user

Cordova WebSQL - onSubmit

僤鯓⒐⒋嵵緔 提交于 2020-01-14 03:22:18
问题 I'm new to Cordova and currently working with it. I'm creating a login script at the moment, but when I submit a form it looks like the database won't react. The following is what I'm trying to do: When the API's are loaded, create a table and insert a record. When user submits the form, check if the inserted data equals the data of the table. If it matches, go to a new page. I'm not even getting the alert invalid ... when I inserted something useless. I'm getting the success! alert when I

Increase the size of the WebSQL quota in a WebView

拜拜、爱过 提交于 2020-01-11 08:59:35
问题 In a normal Android web app the maximum size for a WebSQL database is normally around 8MB. In a hybrid web app I am making I would like to increase this limit. How would I go about doing that? It seems that WebStorage might have something to do with it, but the only method I can see there that seems to set the size, setQuotaForOrigin , is marked deprecated . Sample code (that is not deprecated) is welcome :) 回答1: The quota for a web app seems to differ from that of a hybrid app (as in

Access localStorage or web database created in PhoneGap from Android native code

强颜欢笑 提交于 2020-01-11 08:50:32
问题 How is it possible to access Web SQL database created in PhoneGap app from native code in Android? I have a local notification plugin set up and what I want to achieve is fetch user setting from web database to set a correct interval for my alarm. 回答1: I have modified the Cordova(https://github.com/Coder-Nasir/incubator-cordova-android) in such a way that it will create the database in Android's Default location which is /data/data/package-name/databases/ By just this simple command window

Chrome Version 75.0.3770.80 (Official Build) (64-bit) - unable to begin transaction (3850 disk I/O error)

牧云@^-^@ 提交于 2020-01-11 06:56:35
问题 In windows 7 chrome latestVersion 75.0.3770.80 (Official Build) (64-bit) got an error while get data and write data to chrome browser db in web sql. "unable to begin transaction (3850 disk I/O error)". Do you know any solution to this issue? 回答1: This issue happens if you edit (insert/replace/update) the same data to the same table at the same time. One of the possible cases is you're having 2 tabs opened that access the same database. This is chrome regression since it was working before v75

inAppbrowser and webSql failure - cordova

自闭症网瘾萝莉.ら 提交于 2020-01-06 02:38:16
问题 I'm using cordova 3.4.1 and inAppbrowser. I'm using webSql. At the page load I'm retriving some data from database. Works fine at that moment. Next with some button press, database entry is updated and a inAppBrowser window is opened. tx.executeSql('UPDATE tb_comic SET page="'+image_id+'" WHERE id="'+id+'"'); ref=window.open('base.html','_blank','location=no, toolbar=yes, EnableViewPortScale=yes'); ref.addEventListener('exit', iabClose); function iabClose(event) { alert(event.type); ref.close

Cordova App sqlite database viewer on runtime app testing like Web SQL

坚强是说给别人听的谎言 提交于 2020-01-05 08:34:51
问题 I am creating Hybrid app for android & iOS platform using Cordova. In this app I need to store information in database (currently storing in WebSQL). But WebSQL not supporting in android 4.4.4 version. Now we decided to switch from WebSQL to Sqlite. in WebSQL I can view database by inspecting app using Google Chrome browser. But After implementing sqlite plugin Im not able to view database while app is running (or inspect mode in google chrome). Please help me. 回答1: if you are executing on a

Cross browser HTML5 storage library [closed]

时光总嘲笑我的痴心妄想 提交于 2020-01-01 09:55:54
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I have one requirement where should be stored locally when internet is not available. It should handle it in cross browser compatible way. Now as I know there are variety of options to store the data locally (indexedDB, WebSQL, localStorage). All I really want is a unified API. I don't want to detect and write