The Battery Meta Tag is used to set the attributes of the battery indicator and retrieve battery status.
Battery (META Tag) Syntax <META HTTP-Equiv="Battery" content="[parameter> <META HTTP-Equiv="Battery" content="BatteryEvent:url('[jsFunction | url]')">
Items listed in this section indicate methods or, in some cases, indicate parameters which will be retrieved.
Name Description
Default Value GetSmartBatteryStatus Triggers a SmartBatteryEvent. This returns attributes about the battery such as number of charge cycles and date of manufacture. N/A
Copy methods template to clipboard: META Tags Javascript
Items listed in this section indicate parameters, or attributes which can be set.
Name Possible Values Description
Default Value Visibility:[Value] Visible or Hidden Sets whether or not the battery indicator is shown Hidden Left:[Value] Pixel value Sets the horizontal position of the battery indicator in pixels. If it is negative then indicator will be moved off screen Top left of screen Top:[Value] Pixel value Sets the vertical position of the battery indicator in pixels. if value is negative then indicator will be moved off screen Top left of screen IconPosition:[Value] Left, Right, Top, Bottom Sets the position of indicator icon with respect to Graph position. "Iconposition" and "Graphposition" combination must be a valid combination e.g both cannot be left. Bottom GraphPosition:[Value] Left,Right,Top,Bottom Sets the direction towards which level bars will grow e.g if value is Left then level bars grow from right to left. "Iconposition" and "Graphposition" combination must be a valid combination e.g both cannot be left. Right Color:[Value] Hex Values (#000000 - #FFFFFF) RGB value that sets the color of the battery indicator using HTML web colors #000000
Copy parameters template to clipboard: META Tags Javascript
Modules return information back to their web pages via retrieval tags, for example the scanner has a retrieval tag called 'DecodeEvent' which is called whenever it decodes a barcode. To register to receive a retrieval tag call the module as follows:
<META HTTP-Equiv="[Module]" content="[RetrievalTag]:url('[URI]')">So to register to retrieve the Scanner's DecodeEvent the following syntax would be used:<META HTTP-Equiv="Scanner" content="DecodeEvent:url('Javascript:doScan('%6', '%s', %3, '%2');')">Retrieval tags return information by replacing the text in place holders, defined as '%s' or '%<number>'. Each place holder represents 1 return value with '%s' being populated sequentially or '%<number>' providing direct acces to the desired value.
If the content for the Scanner's DecodeEvent is:
"url('Javascript:doScan('%6', '%s', %3, '%2');')"
The function would be called as follows:"Javascript:doScan('Decode', '5449000053879', 0x35, 'SCN:EAN13');"
BatteryEventThe BatteryEvent gives an indication of the remaining battery level. Once registered for you will receive a BatteryEvent at regular intervals, as specified by the BatteryRefresh configuration setting.
ID Name Description 1 AC Line Status The AC line status (whether or not on external power). 2 Battery Life Percent Remaining battery power as a percentage. 3 Backup Battery Life Percent Remaining backup battery power as a percentage.
Copy this return value template to clipboard: META Tags Javascript SmartBatteryEventReturns various parameters relating to battery charge and battery hardware. Not all return values may be supported by all batteries.
ID Name Description 1 Serial Number The serial number of the battery 2 Part Number The part number of the battery, e.g. 21-65587 Rev. A 3 Battery Charge Cycles The number of times the battery has been charged. Partial charges are aggregated, therefore each charge cycle count represents one full charge / discharge cycle. The battery charge cycle count gets updated when the battery charging state changes from charging to not charging. Cycle count may not accuratley predict the life of a battery. 4 Rated Capacity Rated capacity of the battery in mAh 5 Manufacture Date Date the battery was manufactured expressed as MM/DD/YYYY. 6 State Of Health "Healthy", "Unhealthy" or "Unknown"
Copy this return value template to clipboard: META Tags Javascript
The following example shows the battery indicator, sets the x and y co-ordinates to 50, the color of the indicator to red and positions the indicator at the bottom of the screen growing from right to left:
<META HTTP-Equiv="battery" Content="visibility:visible"> <META HTTP-Equiv="battery" Content="Left:50"> <META HTTP-Equiv="battery" Content="Top:50"> <META HTTP-Equiv="battery" Content="IconPosition:Bottom;Iconposition:right"> <META HTTP-Equiv="battery" Content="Color:#FF0000">
Copy example to clipboard Example shown above can also be written as shown below
<META HTTP-Equiv="Battery" Content="Left:50;Top:50;IconPosition:Bottom;Iconposition:right;color:#FF0000;visibility:visible">
Copy example to clipboard Parameters can also be concatenated as shown below
<META HTTP-Equiv="Battery-Left" Content="Left:50"> <META HTTP-Equiv="Battery-Top" Content="Top:50"> <META HTTP-Equiv="Battery-Color" Content="Color:#FF0000">
Copy example to clipboard The following example navigates to a new page with parameters upon a battery status change.
<META HTTP-Equiv="Battery" Content="BatteryEvent:url('mypage.asp?Data=%s&Source=%s&Type=%s&Time=%s&Length=%s')">
Copy example to clipboard
OverlappingDo not display the Battery indicator overlapping with the Signal indicator.Indicator PositionsFor an illustrative guide to the meaning of IconPosition and GraphPositions see the 'Indicator Positions' section.
Supported Platforms Windows CE, Windows Mobile, Windows Mobile SE Persistence With the exception of the return events, this tag is persistent. Min. Requirements None.