Warning Older Docs! - You are viewing documentation for a previous released version of RhoMobile Suite.

Message

NFC Message

This class representative NFC Message object

# Enabling the API
In order to use this API you must include the following extension in your `build.yml`
        extensions: ["nfc"]

<div class="alert alert-warning"><table>
<td><i class="icon-warning-sign icon-2x"></i></td>
<td>If you are building a Windows Mobile or Windows CE app with this API, you must set your app_type as "rhoelements" in your build.yml as shown [here](../guide/build_config#other-build-time-settings).</td>
</table></div>


Methods

addMessage(STRING messageID)

Add new Smart Poster message to the message.

Parameters

  • messageID : STRING

    Added Message object ID.

Synchronous Return:

  • Void

Method Access:

  • Instance Method: This method can be accessed via an instance object of this class:
    • myObject.addMessage(STRING messageID)

addRecord(STRING recordID)

Add new Record to Message.

Parameters

  • recordID : STRING

    Added Record object ID.

Synchronous Return:

  • Void

Method Access:

  • Instance Method: This method can be accessed via an instance object of this class:
    • myObject.addRecord(STRING recordID)

close()

Release NFC resources.

Synchronous Return:

  • Void

Method Access:

  • Instance Method: This method can be accessed via an instance object of this class:
    • myObject.close()

create()

Creates message object.

Synchronous Return:

  • Rho.NFC.Message :

    Created Message object.

Method Access:

  • Class Method: This method can only be accessed via the API class object.
    • JavaScript: Rho.Message.create()
    • Ruby: Rho::Message.create()

getContent()

Returns Message as byte array.

Synchronous Return:

  • STRING :

    Message to get.

Method Access:

  • Instance Method: This method can be accessed via an instance object of this class:
    • myObject.getContent()

getMessageById(STRING id)

This function returns Message object.

Parameters

  • id : STRING

    Message object ID.

Synchronous Return:

  • SELF_INSTANCE :

    “self” instance of the Message object.

Method Access:

  • Class Method: This method can only be accessed via the API class object.
    • JavaScript: Rho.Message.getMessageById(STRING id)
    • Ruby: Rho::Message.getMessageById(STRING id)

getMessages()

Return array of Smart Poster Message objects.

Synchronous Return:

  • ARRAY :

    Array of Rho.NFC.Message objects.

    • Object : Rho.NFC.Message

Method Access:

  • Instance Method: This method can be accessed via an instance object of this class:
    • myObject.getMessages()

getRecords()

Return array of Record objects.

Synchronous Return:

  • ARRAY :

    Array of Rho.NFC.Record objects.

    • Object : Rho.NFC.Record

Method Access:

  • Instance Method: This method can be accessed via an instance object of this class:
    • myObject.getRecords()

Properties

ID : STRING Read Only

Object ID.

Property Access:

  • Instance: This property can be accessed via an instance object of this class:
    • myObject.ID