The AirBeam Preexisting JavaScript Object contains properties and methods which can be used to control the AirBeam Smart client. AirBeam is a separate application provided by Zebra Technologies and provides the ability to download software packages to your mobile device. If you have configured ‘PreloadLegacyAirBeam’ to be ‘1’ the JavaScript object ‘airbeam’ will be inserted automatically into your page’s DOM by RhoElements.
AirBeam (Preexisting JavaScript Object) <META> Syntax |
---|
airbeam.AddPackage('myPackage'); |
Name | Parameters | Returns |
---|---|---|
AddPackage Instructs the AirBeam Smart client to add the named package to the package list (can be added up to four times) |
Name: PackageName,
Values: String Description: The name of the AirBEAM package to add. |
True if the package was successfully added or false if it was not |
DeletePackage Instructs the AirBeam Smart client to delete the specified package |
Name: PackageName,
Values: String Description: The name of the AirBEAM package to be deleted. |
N/A |
UploadPackage Instructs the AirBeam Smart client to process the specified package for upload |
Name: PackageName,
Values: String Description: The name of the AirBEAM package to process for upload. |
N/A |
Run Instructs the AirBeam Smart client to run the client and perform the current configuration. Note that the client is run as the foreground application. |
The exit code of the AirBeam Smart client |
Name | Description |
---|---|
AutoLoadMode | 0 - 3, describes how synchronization is started. See remarks. |
AutoReboot | True or False, whether or not the enable auto reboot mode. |
RAMManagement | True or False, Enables or Disables RAM Management mode. |
TestMode | True or False, Whether or not packages should be loaded when added. |
The following mode settings apply to the AutoLoadMode Property
0: Synchronization is not automatically started. 1: Synchronization is automatically started in interactive mode. 2: Synchronization is automatically started in non-interactive mode. 3: Synchronization is automatically started in background mode.
The AirBeam Preexisting JavaScript Object provides backwards compatibility with code written for PocketBrowser and also supports the syntax below. Because RhoElements inserts the object ‘airbeam’ on the page automatically when ‘PreloadLegacyAirBeam’ is configured to be ‘1’ you can not create your own objects by this name, see below:
<script> // Old PocketBrowser syntax to support AirBeam var myObj = new ActiveXObject("PocketBrowser.AirBEAMSmart"); // Note: var airbeam = new ... will fail because the object already exists on the page. myObj.Run(); </script>
RhoElements Version | 1.0.0 or above |
---|---|
Supported Devices | All supported devices. |
Minimum Requirements | None. |
Persistence | Immediate - These methods are actioned immediately. |
The Following example shows usage of the AddPackage and Run methods:
<script> function doSync(){ if(airbeam.AddPackage("myPackage")) { setTimeout('airbeam.Run();', 100); } else{ alert('Add Package Failed. You can only have a maximum of 4 packages'); } } </script>
The Following example shows usage of the AutoLoadMode, AutoReboot, RAMManagement and TestMode properties:
<script> function doSync(){ airbeam.AutoLoadMode = 2; airbeam.AutoReboot = false; airbeam.RAMManagement = true; airbeam.TestMode = false; airbeam.AddPackage('myPackage'); setTimeout('airbeam.Run()', 100); } </script>
The Following example shows usage of the DeletePackage method:
<script> function doSync(){ airbeam.DeletePackage = 'myPackage'; setTimeout('airbeam.Run()', 100); } </script>
The Following example shows usage of the UploadPackage method:
<script> function doSync(){ airbeam.UploadPackage = 'myPackage'; setTimeout('airbeam.Run()', 100); } </script>