XML Minibrowser

A D-Series phone can download and display customer provided content using the XML Minibrowser. This process

  • downloads a XML file
  • parses its contents
  • displays a menu, which the user can navigate and interact with.
  • processes user actions

To setup a working Minibrowser infrastructure you need:

  • A webserver
  • Valid XML files (generated or prepared)
  • A D-Series phone

A configured key is the simplest way to invoke the Minibrowser.

  <keyConfiguration>
    <function>
      <invocations>
        <invocation>
          <http>
            <request httpMethod="get">
              <uri>http://my.server.tld/minibrowser.xml</uri>
            </request>
            <httpReactions>
              <responseCode dialogMessage="" ledColor="off" ledBlinking="false">
                <responseCode>200</responseCode>
              </responseCode>
            </httpReactions>
          </http>
        </invocation>
      </invocations>
    </function>
  </keyConfiguration>

The key invokes the http request. If the downloaded file is a valid document, the Minibrowser engine renders and displays the content.

A menu contains a set of Items. Each item can have multiple defined actions. The actions can range from downloading another document to initiating a call or preparing a dial that the user can then complete.

The following example shows the interaction, that can be achieved:

minibrowser.xml
<?xml version="1.0" encoding="UTF-8"?>
<Menu xmlns="minibrowser_v01.xsd">
    <Title>Contacts</Title>
    <Item>
        <TextLine>
            <Text>John Doe</Text>
        </TextLine>
        <AutomatedActions>
            <Url on="do it">http://my.server.tld/details_john_doe.xml</Url>
            <Dial on="make call, mb make call">71</Dial>
        </AutomatedActions>
    </Item>
</Menu> 
details_john_doe.xml
<?xml version="1.0" encoding="UTF-8"?>
<Menu xmlns="minibrowser_v01.xsd">
   <Title>John Doe (Details)</Title>
   <Item>
      <TextLine>
        <Text>Name: John Doe</Text>
      </TextLine>
   </Item>
   <Item>  
      <TextLine>
        <Text>Number: 71</Text>
      </TextLine>
      <AutomatedActions>
        <Dial on="do it, make call, mb make call">71</Dial>
      </AutomatedActions>
   </Item>
</Menu>

On key press, minibrowser.xml is served by the webserver. The list (titled 'Contacts') contains one item, which supplies two different actions: do it and make call. The OK key on phone activates the do it action. The Hook or Speaker keys would for example invoke the make call action.

On do it the phone downloads the URL and displays details_john_doe.xml. In this document, the name has no associated actions, while most actions on the number item start a call.

The minibrowser has the following actions (see syntax in XSD).

The document can state actions in every single item and general actions. Actions are executed when a certain trigger occurs (e.g. do it, make call). Each action defines which trigger(s) cause it to execute. When a trigger-signal is generated:

  • first all actions listed in the currently selected item get executed
  • next all general actions for that trigger get executed
  • last the default action for that trigger executes (e.g. close the minibrowser on trigger mb exit)

A trigger can be stopped with the Stop-action. When this action gets executed, the above execution-chain stops.

Url

The Url action executes a http GET request with the given URL.

Dial

The Dial action invokes a call on the device. Using the min_len attribute, the phone can prepare a number for the user to complete.

Timer actions

The timer actions allow the execution of triggers after a given timeout. Using the timer capabilities, a dialog can close itself after 25 seconds of inactivity.

timer.xml
<Dialog xmlns="minibrowser_v01.xsd">
    <Title>Activate Lamp?</Title>
    <Text>Press OK to accept</Text>
    <AutomatedActions>
        <StartTimer on="shown" timer_id="MainTimer" timeout="25000ms" />
        <RestartTimer on="user activity" timer_id="MainTimer" />
        <Trigger on="timeout MainTimer">mb back</Trigger>
        <StopSignal on="back" />
        <Url on="do it">http://my.server.tld/activate_lamp</Url>
    </AutomatedActions>
</Dialog>
input.xml
<?xml version="1.0" encoding="UTF-8"?>
<Menu xmlns="minibrowser_v01.xsd">
  <Title>Input</Title>
  <Item id="1">
    <TextInput>
      <Default/>
      <Help>Enter your info</Help>
      <InputMode>alphanumeric</InputMode>
      <InputType>plain</InputType>
      <Parameter>user_input</Parameter>
    </TextInput>
    <AutomatedActions>
     <Url on="changed" answer="show">http://my.server.tld/input</Url>
     <Url on="do it" answer="show">http://my.server.tld/final_input</Url>
    </AutomatedActions>
    <Options>
      <Option>
        <Text>Save</Text>
        <Url on="do it" answer="show">http://my.server.tld/option_save</Url>
      </Option>
    </Options>
  </Item>
  <Item>
    <TextLine>
      <Text>Save with global handling</Text>
    </TextLine>
  </Item>
  <Item>
    <TextLine>
      <Text>Save with local handling</Text>
    </TextLine>
    <AutomatedActions>
       <Url on="do it" answer="show">http://my.server.tld/save</Url>
    </AutomatedActions>
  </Item>
  <AutomatedActions>
     <Url on="do it" answer="show">http://my.server.tld/global_save</Url>
  </AutomatedActions>
</Menu>

The file mentioned above presents interactions combined with user input. It defines a TextInput field and specifies several attributes like for instance the input type. The element Parameter specifies the name of the parameter used in the Urls query string.

The TextInput item has two associated AutomatedActions. The changed action is called on every text input. When a user enters a j, the phone sends a HTTP request to http://my.server.tld/input?user_input=j.

When the user leaves the input mask ( with OK or a navigation key ) the phone invokes the do it action and sends a request to http://my.server.tld/final_input?user_input=j.

The document additionally defines a Option save, which is preseted on one of the phones softkeys ( D100-D200 ) or on long press ( D400 and above ).

If multiple input elements should be combined, it is easier to define a final save action. The above document defines such an item, with a Url action. The phone appends all available input parameters to the Url.

The document also presents the possibility of a global Url action. This is called for all do it triggers, that are not handled otherwise.

The Minibrowser engine tries to be compliant with XML files using common dialects of other companies like snom or tiptel.

For example, the phone accepts the following document:

tiptel.xml
<?xml version="1.0" encoding="UTF-8"?>
<TiptelIPPhoneTextMenu Beep="yes" style="numbered">
    <Title>Phone register</Title>
    <MenuItem>
        <Prompt>Tiptel.com</Prompt>
        <URI>http://my.server.tld/more_info_about_tiptel.xml</URI>
        <Dial>004921024280</Dial>
    </MenuItem>
    <MenuItem>
        <Prompt>My dentist</Prompt>
        <URI>http://my.server.tld/info_about_dentist.xml</URI>
        <Dial line="2">00800123412341234</Dial>
    </MenuItem>
    <SoftKey index="4">
        <Label>Dial</Label>
        <URI>SoftKey:Select</URI>
    </SoftKey>
</TiptelIPPhoneTextMenu>

and interprets it as:

new_tiptel.xml
<?xml version="1.0" encoding="UTF-8"?>
<Menu xmlns="minibrowser_v01.xsd">
    <Title>Phone register</Title>
    <Item>
        <TextLine>
            <Text>Tiptel.com</Text>
        </TextLine>
        <AutomatedActions>
            <Url on="do it">http://server/more_info_about_tiptel.xml</Url>
            <Dial on="make call, mb make call">004921024280</Dial>
        </AutomatedActions>
    </Item>
    <Item>
        <TextLine>
            <Text>My dentist</Text>
        </TextLine>
        <AutomatedActions>
            <Url on="do it">http://server/info_about_dentist.xml</Url>
            <Dial on="make call, mb make call">00800123412341234</Dial>
        </AutomatedActions>
    </Item>
    <AutomatedActions>
        <Beep on="shown" />
    </AutomatedActions>
    <Options>
        <Option>
            <Text>Dial</Text>
            <Trigger for="item">do it</Trigger>
        </Option>
    </Options>
</Menu>

Support for multiple languages

Every text element in the document can contain a language attribute. This enables the phone to select the text elements using its configured language.

  <Item>
    <TextLine>
      <Text lang="en">hello world</Text>
      <Text lang="de">Hallo Welt</Text>
      <Text lang="el">Γεια σου κόσμο</Text>
   </TextLine>
 <Item>