3 Replies Latest reply on Feb 11, 2016 7:05 AM by Pietro Francesco Maggi

    SB1 and PouchDB

    Khai-Van Phu

      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.

     , line 8: TypeError: 'undefined' is not a function (evaluating 'Mr[t].bind(Mr)')

      0 2015-12-10 18:56:46

      ERROR: Engine e: PouchDB, 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

        • Re: SB1 and PouchDB
          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.




          • Re: SB1 and PouchDB
            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');

              • Re: SB1 and PouchDB
                Pietro Francesco Maggi

                Hi Khai-Van,

                What is the use case here?


                Updating the SB1 to a new browser engine is not an easy task, just from a compatibility point of view. With an high risk that the device memory is too limited for something like PouchDB.


                If you think that there’s a business case, you can do some test with the latest EB version (that you can connect to the Chrome Dev Tools on your PC) and evaluate the memory impact/speed on something like the MC2180.

                Then contact Zebra Regional Product Managers and SB1 Product Manager.


                I really like the SB1. I’ve seen nice project using it in surprising ways, and more projects are coming into production in different vertical market.

                The key in this cases is to understand the device limits and design a solution with them in mind.