.. include:: api/google.clients3-generate_204.rst
.. include:: api/mytolino-tolino-status.rst
.. include:: api/internal-urls.rst
+.. include:: api/javascript.rst
About
Goes back to the main screen.
``epublishing://closeshop_skoti``
- FIXME
+ Close the Skoobe shop
``epublishing://handshakeCancel``
FIXME
FIXME
``epublishing://library``
- FIXME
+ Open the "my books" library view
``epublishing://library_skoti``
FIXME
The ``code`` is optional.
``epublishing://openbook``
- FIXME
+ Start the reading mode for the given book
Parameters:
``deliverableid``
- FIXME
+ Book ID to open.
+
+ Example: ``DT0400.9783641267575_A39529579``
``epublishing://openbook_skoti``
FIXME
``epublishing://openextract``
- FIXME
+ Download the file and start the reading mode for a demo book extract
+ (German: "Leseprobe")
Parameters (all 4 must be passed):
``extractcoverurl``
- FIXME
+ URL of the book cover image.
``extractdeliverableid``
- FIXME
+ Book ID
``extractdownloadurl``
- FIXME
+ Download URL for the book demo ``.epub`` file.
``extractpurchaseurl``
- FIXME
+ Where to buy the book after reading the extract.
+
+ Is used at the "To the shop" button that is shown on top of
+ the reading view for demo books.
+
+ The URL in the web view must not be escaped for this link to work.
+ Escpecially the ``&`` may not be escaped as ``&``
+ (which would be correct HTML), so you are forced to provide invalid HTML.
``epublishing://opensearchresult``
FIXME
``epublishing://search``
- FIXME
+ Open the "search books" view.
Parameters:
``q``
- Search term
+ Search term to search the books list for.
--- /dev/null
+==============
+Javascript API
+==============
+
+Non-browser web views have a special JavaScript API that provides
+integration with Tolino UI elements.
+
+Example is the ShopWebViewActivity that is opens when clicking the
+"To the shop" link and the recommendations/advertisements on the main page.
+
+
+``android_init()``
+==================
+When the page has been loaded in the web view,
+a function ``android_init`` is invoked.
+This can be used to detect if the page has been loaded on a Tolino.
+
+
+``screenController``
+====================
+Each web view has a JavaScript variable ``screenController``
+that provides the interface to the Tolino UI.
+
+
+``screenController.hideNavigationHeader()``
+ Hides the header when it was enabled with ``showNavigationHeader``.
+
+``screenController.hideProgressDialog()``
+ FIXME
+
+``screenController.refreshScreen()``
+ Re-draw the e-ink screen
+
+``screenController.setNavigationHeaderTitle("my header")``
+ Override the title in the navigation header.
+ Call ``showNavigationHeader`` first.
+
+``screenController.setNavigationHeaderUrl("epublishing://closeshop")``
+ Set the URL of the "back" arrow button.
+
+``screenController.setTokens("accesstoken", "refreshtoken")``
+ FIXME
+
+``screenController.showNavigationHeader("header title")``
+ Show the native navigation header and set its title
+
+``screenController.showProgressDialog()``
+ FIXME
+
+``screenController.processHTML("<html>")``
+ Does nothing (Firmware 15.2)