Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

If you do not have an Android device to try out WSO2 IoT Server, follow this tutorial and enroll an Android Virtual Device (AVD) with WSO2 IoT Server.

Tip
titleBefore you begin
  • Make sure to enable the virtualization technology on your basic input/output system (BIOS). This is required to create the Android virtual device.
  • Make sure you have Android API 23 and the Intel 86 Atom System Image installed for API 23.
    Image Added
  • Start the WSO2 IoT Server core profile.

    Code Block
    ------Navigate to the bin directory----
    cd <IoT_HOME>/bin
     
    -------For Linux/MacOS/Solaris----- 
    sh iot-server.sh
    
    ------------For Windows------------
    iot-server.bat

Let's get started!

  1. Sign in to the Device Management console. 

    Expand
    titleClick here for more information.

    Insert excerpt
    Accessing the WSO2 IoT Server Consoles
    Accessing the WSO2 IoT Server Consoles

  2. Click Add under DEVICES. 
  3. Click  to try out the virtual Android device.
  4. Click Download the virtual Android device.
  5. Unzip the downloaded android-tryIt.ZIP file.

  6. Run the startEmulator script on your terminal.

    Localtabgroup
    Localtab
    activetrue
    titleLinux/Mac
    Code Block
    cd <ANDROID_TRY_IT> ./startEmulator.sh
    Localtab
    titleWindows
    Code Block
    cd <ANDROID_TRY_IT> startEmulator.bat
  7. Install the Android SDK on your computer by entering n when prompted.

    Code Block
    Do you have an Android SDK installed on your computer (y/n) ? :
    Note

    If you have an Android SDK already installed on your computer, enter y, and provide its location when prompted.

  8. Create the AVD by entering y when prompted.

    Code Block
    Do you want to create WSO2_AVD with default configs (y/n)?:  
  9. Next, the system prompts to create a custom hardware profile by requesting for device specific details. You can enter no as the response and skip this step.

    Code Block
    Do you wish to create a custom hardware profile [no]
  10. If you have multiple AVDs, enter WSO2_AVD to continue with the tutorial.

    Code Block
    Enter AVD number to start (eg: 1) :
    Note

    If you only have the WSO2_AVD on your computer, it starts automatically.

  11. If you are running the script on a Mac or Windows OS, the system prompts to install the Hardware Accelerated Execution Manager (HAXM) to get the Android emulator running. Enter the password and proceed with the installation.

    Code Block
    Installing intel HAXM,  Please wait ... 
    Password:
    Note

    If you are running the AVD for the first time, it takes a couple of minutes for the virtual device to start up and complete the agent installation process.

    Once the installation is complete, the system prompts you to restart your computer, and run the emulator. 

    Code Block
    Silent installation Pass! 
    Please restart your machine and run again.
    Note

    If you restart your computer as part of the HAXM installation process, make sure to start the WSO2 IoT Server core profile before running the emulator.

    Code Block
    cd <IoT_HOME>/bin
    sh iot-server.sh
  12. After running the emulator, tap SKIP AND GO TO ENROLLMENT, which will direct you to install the device with WSO2 IoT Server in the default manner.

    Info

    In WSO2 IoT Server, data containerization is implemented using the Managed Profile feature. For more information on how to  set up the Work-Profile , see  Setting Up the Work Profile .

  13. Enter the server IP and the port as your server address in the text box provided and tap START REGISTRATION.

    Example: Register the device via HTTP: 10.100.7.35:8280

  14. Type your details and tap SIGN IN. A confirmation message appears.

    Tip

    Unsure of what to enter? Check out the details provided under step 2 of the virtual Android device's try it out page or follow the steps given below.

    Expand
    titleExample:
    • Organization: This field is optional. You need to enter organization name only if you are running in a multi-tenant environment. 

      Info

      If you are not running in a multi-tenant environment, the default organization name is carbon.super. But you can choose to keep this field blank too.

    • Username: Your WSO2 IoT Server username.
    • Password: Your WSO2 IoT Server password.

  15. Read the policy agreement, and tap AGREE to accept the agreement.
  16. Tap ACTIVATE to enable the WSO2 agent administrator on your device. A confirmation message appears after enabling the device admin.
  17. Tap ALLOWto allow the WSO2 Android agent to make and manage phone calls, to access photos, media, files, and the device location.  

  18. Set a PIN code of your choice with a minimum of 4 digits and tap SET PIN CODE. The PIN code is used to secure your personal data. Thereby, the WSO2 IoT Server is not able to carry out critical operations on your personal data without using this PIN. 
    Example: If the device management admin needs to wipe your device or remove data from the device, he/she cannot directly wipe it without the PIN code. You have to provide the PIN code to get your device wiped or you can log into the device management console and wipe your device by entering the PIN code. A confirmation message appears.  

  19. You have now successfully registered your Android device. Tap Device Information to get device specific information, and tap Unregister if you wish to unregister your device from WSO2 IoT Server. 

  20. Navigate to the device management console and click View under devices to confirm that your device is registered.
  21. Click the device and navigate to the DEVICE DETAILS page. 

    Check out the following features available on the DEVICE DETAILS page:

    • Device Details: The top-left section of the DEVICE DETAILS page displays the following device information that are automatically retrieved when you register the device with WSO2 IoT Server. 

      InformationDescription
      Device owner and device nameIndicates the name of the device owner and the name given by the device owner to the device (e.g. Admin's Android Virtual Device). You can edit the device name via the DEVICES page.
      ModelThe type of the device.
      OwnershipIndicates the device ownership as either BYOD or COPE.
      StatusIndicates whether the device is active, inactive or removed from WSO2 IoT Server.
      Battery levelIndicates the battery level of the device.
      RAM usageIndicates the RAM usage of the device as a percentage.
      Local storageIndicates the device memory consumption.
      External storageIndicates the external memory consumption.

    • Device Operations: The following operations are supported for Android in WSO2 IoT Server: 

      OperationPurpose
      RingRing the device via WSO2 IoT Server. (e.g., If you click the Ring operation, the virtual device starts ringing and a notification gets displayed. To stop the ringing tap OK on the notification.) This is useful to locate a misplaced device.
      Device LockLock the device via WSO2 IoT Server. This is useful when a device gets lost or stolen.
      LocationRetrieve the device location.
      Clear PasswordRemove a device lock.
      RebootReboot or restart the device. By default, this is operation is inactive for AVD.
      Upgrade FirmwareUpgrade device firmware to a newer version over-the-air (OTA). By default, this operation is inactive for AVD.
      MuteEnable the silent profile of the device.
      MessageSend a message to the device via WSO2 IoT Server. Device admins can use this device operation to send private and group messages device owners.
      Change Lock-codeChange the passcode or lock code of the device.
      Enterprise WipeUnregister the device from WSO2 IoT Server.
      Wipe DataCarry out a factory reset on the device. To perform this operation, the user must provide the PIN specified during the device registration.

    • Operations Log: This section lists the operations that have been performed on the device and their statuses:
      • IN-PROGRESS: The operation processing at the WSO2 IoT Server side is in-progress and has not yet been delivered to the device.
      • PENDING: WSO2 Iot Server has delivered an operation to the device and is waiting for a response from the device.
      • COMPLETED: WSO2 IoT Server has received a response from the device, for an operation.
      • ERROR: An error has occurred while carrying out the operation. 

      Info

      The operations log gets updated at regular intervals through a polling mechanism. Click on the Refresh Log button to view the latest operations log. For more information on changing the polling interval, see Android Configurations.

    • Applications: This section lists all the applications installed on the device.
    • Location: This section indicates the geographical location of the device.
    • Policy Compliance: This section indicates whether the device complies with the policies enforced on the device. For more information on adding a policy and enforcing it on a device, see Policy Management.

...