SureVideo Android Javascript APIs

Mar 07, 2014 | 42Gears Team

Applies to:
Product SureVideo
Platform Android

SureVideo for Android now comes with built-in set of Javascript APIs. Use these APIs in an HTML file and specify the file as Custom Layout Home Screen.

The APIs are written as window.surevideo.<API_Name>

Following is a comprehensive list of SureVideo APIs:

  • launch(‘file_path’): Launches a media file.


  • loopMedia(): Loops the allowed media files once and returns back to SureVideo Home Screen.


  • launchApp(‘packagename‘ , freshlaunch): Launches an application.

      window.surevideo.launchApp(‘’, true);

  • closeSureVideo(): Closes SureVideo.


Sample HTML Home Screen with SureVideo APIs:


HTML Code for Sample HTML Home Screen:

<style type=”text/css”>
.tbview {border-collapse:collapse;border-spacing:0;}
.tbview td{font-family:Arial, sans-serif;font-size:14px;padding:10px 8px;border-style:solid;border-width:1px;}
.tbview th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;}
.tbview .tbview-left{font-size:x-large;background-color:#2980b9;}
.tbview .tbview-one{background-color:#F660AB}
.tbview .tbview-two{font-size:large;background-color:#50EBEC}
<table class=”tbview” style=”width: 100%; height: 100%;”>
<th rowspan=”2″ class=”tbview-left” onclick = “window.surevideo.launch(‘/mnt/sdcard/movie.mp4’);”>Demo Video</th>
<th class=”tbview-one” onclick = “window.surevideo.launch(‘/mnt/sdcard/a.mp4’);”>Products</th>
<td class=”tbview-five” onclick = “window.surevideo.loopMedia(‘/mnt/sdcard/a.mp4’,4,false);”>Click to loop videos</td>
<tr class=”tbview-right”>
<td class=”tbview-two” onclick = “window.surevideo.launch(‘/mnt/sdcard/video.mp4’);”>Testimonials</td>

To know more about SureVideo, click here

To download a trail version, click here

For any other queries, send an email to

Exclusive News and Updates on Enterprise Mobility!

Subscribe for our free newsletter

Thank you! you are successfully subscribed.
Please enter a valid official email
* I consent to receive newsletters via email from 42Gears and its Affiliates.
Please agree
* I have reviewed and agreed to 42Gears Privacy Policy and Terms of Use prior to subscribing and understand that I may change my preference or unsubscribe at any time.
Please agree