Skip to content

ANDROID Javascript bridge to Pointzi SDK

This document focuses on HTML Tip/Modals that allows the user to include their own HTML, CSS and Javascript source code. Pointzi SDK supports JSBridge meaning by coding javascipt in the Pointzi Dashboard it can call functions in our Pointzi SDK native code.

Quick Example Code for you to try out

HTML

<h1>The onclick Event</h1>
<p>The onclick event is used to trigger a function when an element is clicked on.</p>
<p>Click the button to trigger a function that will output "Hello World" in a p element with id="demo".</p>
<p><input id="button" name="button" type="submit" value="Go to Next Tip" /></p>
<p id="demo"></p>

Javascript

document.getElementById('button').onclick = function() {
   var sum = window.pointzi.switchToNextTip();
};

Dashboard

You can then input the HTML and Javascript here:

Pointzi JS Bridge

JSBridge methods to Handle clicks inside HTML:

switchToNextTip

Shows the NEXT Tip/Modal if there is any and send "next" input to the Pointzi Dashboard analytics for you to view later.

   var sum = window.pointzi.switchToNextTip();

switchToPreviousTip

Show the PREVIOUS Tip/Modal if there is any and send "back" input to the Pointzi Dashboard analytics for you to view later.

   var sum = window.pointzi.switchToPreviousTip();

dismiss

Closes the Tip/Modal and sends "dismiss" input to the Pointzi Dashboard analytics to for you to view later.

   var sum = window.pointzi.dismissTip();