Video Kiosk Remote Management Reference Guide




Because Video Kiosk was designed to be remotely managed, it supports both sending status tracking reports to a URL and receiving responses so you can integrate Video Kiosk remote devices into a management system. Video Kiosk Android examines the response to the HTTP/HTTPS POST for key value pairs that it will use to update the management interface settings. This allows your management system to receive status tracking reports from each device and for your devices to receive instructions from the management system.

A management status POST can be sent:

  • based on a time interval
  • based on a specific time of day
  • any time using the Send Management Report button on the button bar

How to enable device status tracking

To set up device status tracking, follow these steps:

  1. If you plan to send HTTPS posts instead of HTTP posts, get an SSL certificate. For more information, see [HTTP vs HTTPS considerations] below
  2. In the Video Kiosk settings, Video Kiosk Settings Screen>Management configure the following:
    • readable Device ID and Zone (optional settings for your convenience)
    • When to report status
    • URL to report status to
    • Content of the Post

Video Kiosk devices will now send posts to the specified URL.

HTTP vs HTTPS considerations

If you plan to send the Video Kiosk Device password as a means of authenticating the post, you should use HTTPS posts instead of HTTP because it is not a good idea to send password data in the clear. To use HTTPS, you must get an SSL certificate from a certificate authority that the Android OS recognizes. Video Kiosk does not support HTTPS POST to sites using self-signed certificates.

Status Report Post Content: Supported POST Key Value Pairs Sent

The following keys will always be included in the POST:

androidid
The unique id of the device assigned by the Android OS.
uid
The unique id of the device as assigned by you. By default this is the unique id assigned by the Android OS but you can change it to be any string that you like.
version
The Video Kiosk version name like 4.1.0.150529.

The following keys can be included in the POST by selecting them in the Management Settings (Video Kiosk Settings Screen>Management>Management Post Content)

isplaying
A flag that will be true if a video is playing or false otherwise.  Be careful interpreting the value since it can be false if an image file is being displayed or if one video has ended and its last frame is being displayed while the next video is preparing to play but has not yet rendered its first frame.
currentmedia
The name of the currently playing video or displayed image file.  By default this key value pair is enabled.
foldercontent
The names of all the movies and images in the currently selected media folder.
password
The password assigned to the Video Kiosk using the someword.password file.  You can use this to authenticate the Video Kiosk POST and should use HTTPS since its not a good idea to send the password in the clear.
zone
The zone of the device as assigned by you.  This is assigned by you and is used to create any grouping of devices that you would like.
isroot
A flag that will be true if a the device has been granted root access or false otherwise.
uptime
The time, in seconds, since the last device reboot
filesize
An array of file sizes that matches the array of file names
emptyfiles
An array that lists any files that are empty (usually due to a network error during file synchronization with your cloud service).

Other settings

In the Video Kiosk Management settings you can:

  • Change the unique device id
  • Change the device zone
  • Set the  interval time, in minutes, at which Video Kiosk will send the  POST
  • Enable or disable sending the POST using the interval time
  • Set the time of day, in hours and minutes, at which Video Kiosk will send a POST
  • Enable or disable sending the POST using the time of day
  • Configure the URL to which the  POST will be sent
  • Enable or disable the optional key value pairs that can be sent in the  POST

Whenever you change the settings, Video Kiosk will restart the interval time. If you have enabled the time of day status POST, Video Kiosk will synchronize the interval time with the time of day when that POST is sent.

Responses: Supported POST Key Value Pairs in Response

The management interface supports responses by the management system to management status POST, such that the management settings on the device can be changed by the management system.

The management system may respond with a list of key value pairs as follows:

key=value\n
key=value\n

key=value\n

\n means newline as defined in the PHP scripting language.

The values are encoded using the Android URLEncoder and the UTF-8 character set.  PHP programmers that use $_POST variables should decode these values using the urldecode() method.  PHP programmers that use $_REQUEST variables should not decode the values since they have already been decoded.

The supported key value pairs are:

uid=some id
zone=some zone
reporttime=HH:MM (where 0 >= HH <= 23 and 0 >= MM <= 59)
reporttimeenabled=true|false
intervaltime=NNNN (where NNNN > 0)
intervaltimeenabled=true|false
postkey_isplaying=true|false
postkey_currentmedia=true|false
postkey_foldercontent=true|false
postkey_password=true|false
postkey_zone=true|false
postkey_isrooted=true|false
postkey_uptime=true|false

Its important to note that if both intervaltimeenabled and  reporttimeenabled are set to false you will stop that device from reporting status.  If you do that via a management POST response then management posts can only be restarted manually from the device.

If the \n characters are omitted Video Kiosk will ignore the key value pairs.  You MUST include the newline character for every key value pair.

Example of Use: Sending an email containing POST Data – PHP Script

The following PHP script can be used to send an email containing status tracking POST data to whatever email account you would like. You just need to change the values of $to_email, and $from_email and then put the script on your web site in a file named something.php. If you need more information contact us and we can help you.

<?php
    $to_email = ‘you@yourdomain.com’;
    $from_email = ‘do-not-reply@yourdomain.com’;
    $subject = ‘VidoeKiosk Status’;

    foreach ($_POST as $key => $value)
    $message .= htmlspecialchars($key).” = /”.htmlspecialchars(urldecode($value)).”/\n”;

    $headers = ‘From: ‘ . $from_email . “\r\n” .
            ‘X-Mailer: PHP/’ . phpversion();

            mail($to_email, $subject, $message, $headers);
    ?>


More Information

Buy it now
$14.95 / device

Get it on Google Play

Download the
FREE trial

Download Now