  Introduction
  ------------
  This is a sample Java application designed to showcase the functionality of 
  the Remote Command Interface (RCI) service and demonstrates how Device
  Cloud can be used to control remote devices. RCI allows Device Cloud to offer 
  a configuration layer via Device Management accessing device settings and 
  status information described within a descriptor file.
 
  When the application is launched, it instantiates a new Cloud Connector for 
  Java with a custom RCI extension. After that, Cloud Connector is started.

  This example simulates an application which is able to control and configure
  some network settings (such as IP Address, DNS server or WiFi/Cellular
  connection). These settings are read and written in a properties file 
  (settings.txt), which should be located in the root directory of the emulator/
  device file system.


  Main files
  ----------
    * com.etherios.connector.rci.MainApp.java:
      Main application class. Instantiates and starts the Cloud Connector object.

    * com.etherios.connector.rci.ConnectorEventsListener.java: 
      Class that handles the connector events.

    * com.etherios.connector.rci.RCIExtension.java:
      Class that extends the RCI functionality.

    * connector_config.txt:
      Cloud Connector general settings.

    * rci_descriptor.xml:
      File that describes the configurable settings and state information that 
      will be remotely available.

    * settings.txt:
      File which contains the values of the simulated settings.


  Requirements
  ------------
  To run this example you will need:
    * A PC connected to the Internet to host and run the application.
    * A Device Cloud account.
      For further information on how to create a Device Cloud account go to
      the 'Creating a Device Cloud Account' topic of the Getting Started.


  Example setup
  -------------
    1) Ensure Cloud Connector is properly configured.
       This can be done editing the 'connector_config.txt' file which is 
       located in the 'res' folder of the project. Make sure that the 
       'vendor_id' field is filled with your account Vendor ID.
       
       For further information on how to configure the 'connector_config.txt'
       file, go to the 'Cloud Connector Configuration' topic of the
       Developer's Guide.

    2) Ensure the device is registered in your Device Cloud account.
       By default, it is registered automatically because the Device ID is 
       provisioned from Device Cloud. If you want to modify this behavior, 
       read the 'Device ID Type' section (Developer's Guide > Cloud Connector 
       Configuration > General Settings).

    3) The Application Descriptor needs the following API Permissions:

        java.util.PropertyPermission "*" "read,write"
        javax.microedition.io.AccessPointPermission "*"
        javax.microedition.io.Connector.file.read
        javax.microedition.io.Connector.file.write
        javax.microedition.io.SocketProtocolPermission "socket://:*"
        javax.microedition.io.SocketProtocolPermission "socket://*:*"
        javax.microedition.io.SSLProtocolPermission "ssl://:*"
        javax.microedition.io.SSLProtocolPermission "ssl://*:*"
        javax.microedition.location.LocationPermission "location" "location"

    4) The 'settings.txt' file is in the root directory of the emulator/device
       file system. In the emulator, this directory is usually:

       C:\Users\<user>\javame-sdk\8.0\work\EmbeddedDevice1\appdb\filesystem\root1

    5) The Etherios public certificate is imported to the device's keystore.
       For further information, read the 'Adding the Etherios Certificate to
       Your Device' topic inside 'Creating and Building a Java Project with 
       Cloud Connector support' of the Developer's Guide.


  Running the example
  -------------------
  The example is already configured, so all you need to do is to build and 
  launch the application. Refer to the general instructions about how to build, 
  run, and debug the examples for further information.

  To verify that the application is running successfully, follow these steps:

     1) Login into your Device Cloud account.

     2) Click on the 'Device Management' tab.

     3) Verify that your device is connected (you can also check it from the
        output of the logger).

     4) Double click on your device. Verify that the 'Mobile', 'Network', and 
        'WiFi' elements are inside the 'Configuration' category, and the 
        'Memory' info element is inside the 'System Information' category.

  Once this is done, you can edit and save any setting within the 
  'Configuration' category. To verify that the setting has been saved 
  successfully, click the 'Refresh' button or check the output messages of the 
  application.
