Xuan (The STACK Box) Application Development. Xuan (The STACK Box) Application Development

Similar documents
IRF2000 IWL3000 SRC1000 Application Note - Develop your own Apps with OSGi - getting started

Step by Step. Use the Cloud Login Website

Android Setup Phase 2

Islamic University of Gaza. Faculty of Engineering. Computer Engineering Department. Mobile Computing ECOM Eng. Wafaa Audah.

Mobile Labs Plugin for IBM Urban Code Deploy

Android Development Setup [Revision Date: 02/16/11]

Android Environment SDK

The "Eclipse Classic" version is recommended. Otherwise, a Java or RCP version of Eclipse is recommended.

Fahim Uddin 1. Java SDK

How To Use Titanium Studio

How to configure the TopCloudXL WHMCS plugin (version 2+) Update: Version: 2.2

Board also Supports MicroBridge

About this Release. Introduction. Prerequisites. Installation. Using the Web SDK Packager

How to Install Applications (APK Files) on Your Android Phone

JBoss Portal 2.4. Quickstart User Guide

Download and Installation Instructions. Android SDK and Android Development Tools (ADT)

Getting Started with the Ed-Fi ODS and Ed-Fi ODS API

FlexSim LAN License Server

Setting Up a Dreamweaver Site Definition for OIT s Web Hosting Server

Adobe Summit 2015 Lab 718: Managing Mobile Apps: A PhoneGap Enterprise Introduction for Marketers

Table of Contents. Description of the BlackVue App 3. Supported Devices 4. Screen Description 5. Home Screen 5. Video List Screen 6

The goal with this tutorial is to show how to implement and use the Selenium testing framework.

SIM900 Eclipse environment install Application Note_V1.00

WHMCS LUXCLOUD MODULE

How to connect to the University of Exeter VPN service

Android Environment SDK

How To Create A Bada App On Android (Mainfest) On Android And Get A Download Of Bada (For Android) On A Microsoft Gosu 2.5 (For Black

Google App Engine f r o r J av a a v a (G ( AE A / E J / )

Management Website User Guide. SecureAnywhere AntiVirus SecureAnywhere Internet Security Plus SecureAnywhere Complete

UP L18 Enhanced MDM and Updated Protection Hands-On Lab

Using Microsoft Visual Studio API Reference

Tutorial: BlackBerry Object API Application Development. Sybase Unwired Platform 2.2 SP04

Develop a Native App (ios and Android) for a Drupal Website without Learning Objective-C or Java. Drupaldelphia 2014 By Joe Roberts

Installing the Android SDK

USER GUIDE FOR DIGITAL CERTIFICATE

Adobe Summit 2015 Lab 712: Building Mobile Apps: A PhoneGap Enterprise Introduction for Developers

EXTRACTING IOS DATABASE

Secure Messaging Server Console... 2

Setting Up Your Android Development Environment. For Mac OS X (10.6.8) v1.0. By GoNorthWest. 3 April 2012

Android: Setup Hello, World: Android Edition. due by noon ET on Wed 2/22. Ingredients.

Introduction to Android Development

Android Development Tools for Eclipse

How to access ebooks Databases in MII Digital Library

Mapping ITS s File Server Folder to Mosaic Windows to Publish a Website

Uninstalling the software Uninstallation procedure is different between Mac OS X 10.5 and 10.6 & Please follow the instruction below.

Introduction: The Xcode templates are not available in Cordova or above, so we'll use the previous version, for this recipe.

Eclipse installation, configuration and operation

NovaBACKUP Remote Workforce Version 12.5 Cloud Restore

How to Backup XenServer VM with VirtualIQ

Shearwater Research Dive Computer Software Manual

Generate Android App

Utilizing Dropbox to Share Files

Android Development. 吳 俊 興 國 立 高 雄 大 學 資 訊 工 程 學 系

If you already have Uninstalled SonicWALL Global VPN client, or never had it installed you can skip this step.

FileCruiser. Desktop Agent Guide

SFTP Server User Login Instructions. Open Internet explorer and enter the following url:

Android Programming and Security

Getting Started with Android Development

Receiver Updater for Windows 4.0 and 3.x

Frequently Asked Questions Enterprise Mobile Manager

Installing buzztouch Self Hosted

IBI Group FTP: Usage Instructions

Hello World. by Elliot Khazon

Global Image Management System For epad-vision. User Manual Version 1.10

Getting Started Guide

Homework 9 Android App for Weather Forecast

VTLBackup4i. Backup your IBM i data to remote location automatically. Quick Reference and Tutorial. Version 02.00

Magento module Documentation

MiraCosta College now offers two ways to access your student virtual desktop.

Using Application Loader

Qsync Install Qsync utility Login the NAS The address is :8080 bfsteelinc.info:8080

Dashboard Builder TM for Microsoft Access

OpenCV on Android Platforms

Quick Start Guide Mobile Entrée 4

Partek Flow Installation Guide

OFFICE 365 SELF- CONFIGURATION GUIDE

Android Programming. Høgskolen i Telemark Telemark University College. Cuong Nguyen,

Getting Started Android + Linux. February 27 th, 2014

Upgrading Redwood Engine Software. Version 2.0.x to 3.1.0

Basic Android Setup Windows Version

How to use Dropbox. What is Dropbox. Please read the University of Melbourne Guidelines on Dropbox and University Information prior to use.

How To Set Up Egnyte For Netapp Sync For Netapp

Updating KP Learner Manager Enterprise X On Your Server

Cloud Storage Service

Configuring the Active Directory Plug-in

Worksheet 3: Distributed File Systems

2012 Nolio Ltd. All rights reserved

Getting the best from your OneDrive

SERVER CLOUD DISASTER RECOVERY. User Manual

Python for Series 60 Platform

AVTranz The Court Record Online (TCRO) Operating Instructions Vermont Court System

Evolution Connex Control Field Software Updates Version 12 rev

Infinity Touch Control Field Software Updates Version 10 rev

TUTORIAL ECLIPSE CLASSIC VERSION: ON SETTING UP OPENERP 6.1 SOURCE CODE UNDER WINDOWS PLATFORM. by Pir Khurram Rashdi

Download and Installation Instructions. Android SDK and Android Development Tools (ADT) Microsoft Windows

Document OwnCloud Collaboration Server (DOCS) User Manual. How to Access Document Storage

AdRadionet to IBM Bluemix Connectivity Quickstart User Guide

How to add your Weebly website to a TotalCloud hosted Server

Ipswitch Client Installation Guide

Transcription:

Xuan (The STACK Box) Application Development 1

Table of Contents A) Xuan Platform...3 B) Basic Xuan Application Development Process...3 C) Basic UI Only Xuan Application...3 D) Basic UI and Daemon (Python) Xuan Application...4 E) Advance Xuan Application Development Process...8 2

A) Xuan Platform 1. First of all, if you are not familiar with the Xuan platform architecture, please refer to developer.thexuan.com. 2. You can develop HTML app (UI) running on the Xuan App (ios/android) and make HTTPS API request to the STACK Box (developer.thexuan.com/documentation.html). 3. You can develop Python app (Daemon) running on the STACK Box itself. Daemon app can extend the STACK Box features and expose more HTTPS API to external program. It can also call to other daemon app such as system app (2000100) through IPC. 4. You also can develop external program (e.g. ios, Android and etc) and make HTTPS API request to the STACK Box. Xuan developer account is not required for this type of program. 5. For more complex and special corporate project business requirements, please email to xuan@cloudmedia.com for enquiries. B) Basic Xuan Application Development Process 1. Get a STACK Box from cloudmedia.com. 2. Register Xuan developer account at apps.thexuan.com. 3. Develop a new Xuan application, zip and upload it to apps.thexuan.com. 4. Create the Private Token to install and test the application on the STACK Box. 5. Make changes on the application, zip and use the EDIT function to re-upload the app. 6. Use the Private Token to re-install and test the updated application. 7. Repeat steps 5 and 6 above to develop and test the application on STACK Box or use Advance Xuan Application Development Process found later on this document. 8. Submit the application for approval. 9. Once approved, the end users will be able to see and install the application from their Xuan App (ios/android) Apps Market to their STACK Box. 10. Then, use the UPGRADE function when new version of the application is developed. C) Basic UI Only Xuan Application 1. You can use any tools you are familiar with to develop your UI only application (e.g. HTML5) that can run on Xuan App (ios/android) embedded web-browser. 2. The UI can make HTTPS API request to the STACK Box (developer.thexuan.com/documentation.html). For example: https://{box_ip}/cgi-bin/syb_reqresp_cgi? app_id=2000100&module={module_name}&method={method_name} 3. The entry file web/index.html is required for UI application. Download the developer.thexuan.com/helloworld_ui_only_sample.zip to see the example. 4. Finally, zip and upload it to your Xuan developer account (apps.thexuan.com). 3

D) Basic UI and Daemon (Python) Xuan Application 1. Download and install Python 3.3.3 from python.org 2. Download and install latest Eclipse from eclipse.org and install PyDev plugin from Help => Eclipse Marketplace. 3. Go to Window => Preferences => PyDev => Interpreters => New... 4. Go to PyDev Package Explorer view to create a PyDev Project. 4

5. Create 2 folders web for UI and app for daemon. 6. Download the latest Xuan SDK from https://github.com/thestackbox/xuansdk and extract it. Copy the com folder from SDKLibrary to the HelloWorld Project. 7. Create a new PyDev module. Then select <Empty> Template. 8. Download developer.thexuan.com/helloworld_ui_daemon_sample.zip, extract it and copy the app/helloworld.py content to your helloworld.py. Indentation is important for Python, make sure the 4 and 8 spaces indentation are placed correctly. 9. When you extend Application class, on_system_connected and post_system_connected must be overridden and super().on_system_connected() and super().post_system_connected() must be included respectively. 5

10. self.register_method is used to register method that will be exposed through HTTPS. For example: https://{box_ip}/cgi-bin/syb_reqresp_cgi?app_id={app_id}&method=say_my_name&name=my Name 11. self.register_shared_method is used to register method that will be exposed through IPC to allow other daemon Python app to call to. SharedMethod.call(kbxMethodAppId={APP_ID}, kbxmethodname="say_my_name", name="my Name") 12. print is used to print text on the console or terminal for mainly debugging purposes. For more information, please refer to Advance Xuan Application Development Process found later on this document. 13. self.send_response is used to send response back to the UI through HTTPS or back to other Python app through IPC. 14. At this time, you need to create an application on apps.thexuan.com to get one {APP_ID} to allow UI to call to your registered method (self.register_method) through HTTPS. 15. After login through the apps.thexuan.com, go to My Applications and click on Upload New Application. 16. Enter the information of your new application. (Some fields are optional) 17. Then you can get the {APP_ID} from the Application Details page. 6

18. Back to Eclipse, create entry file index.html in web folder and copy the content from HelloWorld_ui_daemon_sample.zip /web/index.html to your newly created index.html. 19. Change the {APP_ID} in the index.html to the App ID shown on your Application Details page and change the MY_NAME to your name. 20. Select app and web folders, right click and select Export.... Then, select General => Archive File and click on Next > button. (SDK library com should not be included) 21. Go back to the Application Details page, click on the EDIT button right in the middle of the page. On Edit Application Details page, select the HelloWorld.zip on Application field and type app.helloworld.helloworld (packages.pyfilename.classname) on App Entry Point field. Finally, click on the UPDATE button at the bottom of the page. 7

22. On Application Details page, click on the Create link to create a Private Token. 23. Go to the Xuan App MY APPS => Apps Market, click on the top right icon and key in the PRIVATE APP Token to install the app onto the STACK Box. 24. Go to MY APPS and test the newly created app. E) Advance Xuan Application Development Process 1. Get a STACK Box from cloudmedia.com. 2. Register Xuan developer account at apps.thexuan.com. 3. Develop a new Xuan application, zip and upload it to apps.thexuan.com. 4. Create the Private Token to install the application on the STACK Box. 5. Create NFS shared folder of your app on your PC. For Windows, you can try some tools like freenfs.sourceforge.net. 6. Use your developer account email to send your STACK Box's MAC Address to xuan@cloudmedia.com to request for telnet password. 7. Telnet (e.g. using putty) to the STACK Box to access to the console/terminal. 8. Mount to your PC NFS shared folder. For example, if the HelloWorld project path is D:\workspace\HelloWorld, and NFS Root Folder Path is set to D:\workspace: # mkdir /tmp/helloworld # mount -o nolock {PC_IP}:/HelloWorld /tmp/helloworld 8

9. Then make symbolic links to the mounted PC NFS shared folders: # mv /install/python/{app_id}/app /install/python/{app_id}/app_ori # ln -s /tmp/helloworld/app /install/python/{app_id}/app # mv /install/python/{app_id}/web /install/python/{app_id}/web_ori # ln -s /tmp/helloworld/web /install/python/{app_id}/web 10. Put a thumbnail image to your web folder (e.g. D:\workspace\HelloWorld\web\thumbnail.png or thumbnail.jpg) just in case you want to see a proper thumbnail on the Xuan App MY APP. 11. At this time, changes made on folders and files under web (e.g. D:\workspace\HelloWorld\web) should be immediately reflected on the Xuan App or webbrowser once refreshed. 12. Restart the python app whenever you make any changes to the Python file before testing. Grab the Process ID (PID) and python command from ps. Then, kill the app and re-run the python command after making sure the app is killed. For example: # ps -ef 12152 root python /install/python/3178489/index -uid 3178489 -appdir /install/python/3178489 # kill 12152 # ps -ef # python /install/python/3178489/index -uid 3178489 -appdir /install/python/3178489 13. After re-run the python command, the app will be running on the console/terminal foreground, meaning you will be able to see all the python print function output on the console/terminal. Use CTRL+c to break the app from the console/terminal foreground. 14. Repeat steps 11 to 13 above to develop and test the application on the STACK Box. 15. Submit the application for approval. 16. Once approved, the end users will be able to see and install the application from their Xuan App (ios/android) Apps Market to their STACK Box. 17. Then, use the UPGRADE function when new version of the application is developed. 9