SB1 and PouchDB

// Expert user has replied.
K Khai-Van Phu 3 years 7 months ago
2 2 0

Hi Zebra Launchpad's members,
 
I wanted to have a try of PouchDB, the JavaScript Database that Syncs! on the Smart Badge SB1.
Unfortunately it seems it is not supported by the embedded browser of SB1.
The JavaScript code below in a HTML page
 
var db = new PouchDB('inventory');
 
generates the following lines in SB1's Log.txt file.
 
http://127.0.0.1:83/UserDrive/apps/inventory/js/pouchdb-5.2.1.min.js, line 8: TypeError: 'undefined' is not a function (evaluating 'Mr[t].bind(Mr)')
0 2015-12-10 18:56:46
ERROR: Engine e: PouchDB
http://127.0.0.1:83/UserDrive/apps/inventory/index.html, line 14: ReferenceError: Can't find variable: PouchDB
 
No such problem on Zebra Android or Windows CE devices with Enterprise Browser.
 
That would be great if the next firmware make support of PouchDB possible on SB1.
 
 
Khai-Van PHU

Please Register or Login to post a reply

2 Replies

P Pietro Francesco Maggi

Hi Kay,
the key point here is that the rendering engine in our SB1 is built on top of RhoElements v2.x that uses a version of Webkit more or less in line with iOS 6. PouchDB list as a minimum requirement iOS v7.1.

Have you done any test using the es5-shim library they talk about on PouchDB website?, this should help supporting older browser.

Regarding including newer RhoElements version on the SB1, is a fine balance between new features and available resources on the device.

Ciao
~Pietro

K Khai-Van Phu

Hi Pietro,
Thank you for your attention to this question and pointing me to the es5-shim library which could potentially make SB1 compatible with PouchDB.
I had a try by including the es5 javascript libraries in the HTML page.
But definitely SB1's browser still generate an error when it sees code var db = new PouchDB('inventory');

CONTACT
Can’t find what you’re looking for?