Altova MobileTogether Designer

NFC Start/Stop

Home Prev Top Next

The NFC Start/Stop action (screenshots below) is used to start or stop the pushing and/or receiving of messages.

MTActionNFCStart

Select the Start options you want. After the action has been added to the design, a $MT_NFC tree is automatically added to the Page Sources Pane (see tree structure below).

 

<Root>

   <Tag Id=""/>

   <NdefMessage 

      CanMakeReadOnly="" 

      IsWriteable="" 

      MaxSize="" 

      Type="">

      <NdefRecord 

         Id="" 

         TypeNameField="" 

         RecordTypeDefinition="" 

         Type="" 

         Text="" 

         Language="" 

         URI="" 

         Payload="" 

         MimeType="" 

         ExternalDomain="" 

         ExternalPackageName="">

         <NdefRecord />

      </NdefRecord>

      <NdefRecord />

         ...

      <NdefRecord />

   </NdefMessage>

</Root>

 

Pushing and/or receiving is started when the Start action is triggered. The sequence of steps that the action sets in motion is as follows:

 

1.NFC must be enabled on the device. If NFC is not enabled, then triggering the Start action will cause a prompt to appear asking the user to enable NFC.

2.After ensuring that NFC is enabled, the MobileTogether Client app will be registered for NFC.

3.Immediately thereafter, NFC tag discovery is automatically started and NFC messages in NFC tags will be automatically received. Pushing can be started via an NFC Push action; it is not automatically started.

4.Received data is stored in the $MT_NFC tree.

 

The Stop action stops the pushing and receiving of all messages.

MTActionNFCStop

To re-start the pushing and receiving of messages, trigger the Start action again.

 

MobileTogether extension functions

MobileTogether provides a range of XPath extension functions that have been specifically created for use in MobileTogether designs. Some functions can be particularly useful with specific actions. For example, mt-available-languages() returns the languages in which the solution is available and could, for example, be used with the Message Box action. If a function is especially relevant to this action, it is listed below. For a full list of extension functions and their descriptions, see the topic MobileTogether Extension Functions.

 

mt-nfc-started()

 

© 2018-2024 Altova GmbH