Skip to content

Reference Quick setup and start guide

Carsten Stocklöw edited this page Apr 26, 2018 · 6 revisions

Table of Contents

Setup, build, run and debug in OSGI

These instructions are for developers willing to build the universAAL source code themselves or just inspect it, but are also helpful for developers willing to implement their own applications over universAAL (in which case they just need to skip steps 4 and 5).

  1. Install Java JDK
  2. Install Maven
  3. Install Eclipse IDE
    • Any other Java IDE can be used as long as you can create OSGi bundles and handle Maven projects with it. universAAL recommends Eclipse IDE, and the instructions here refer to it. Download it from https://eclipse.org/downloads/
    • If you plan to use the modeling and conversion tools from universAAL Studio, you will need specifically Eclipse version 4.6 (Neon).
    1. Install Eclipse Plugins (optional)
      The universAAL Studio is a set of universAAL-specific plugins. Plugin install site: http://depot.universaal.org/eclipse-update/4.6 If you want the modelling tools, remember they require Eclipse 4.6.
  4. Download source code
    • Clone a repository or check it out from https://github.com/universAAL.
    • Each repository usually contains several projects. Regular universAAL projects are Maven projects. Import them into Eclipse with: File > Import > Maven > Existing Maven Projects.
  5. Build the source code
    • To compile the universAAL Maven projects you have to do a Maven install.
      • If you have the Eclipse Maven plugin, you can: right-click the project > Run as > Maven Install.
      • If you installed standalone Maven, open a console command line, go to the folder that holds the POM.xml file of the project and type mvn install.
  6. Download Karaf Distro
  7. Run Karaf
    • First configure Karaf and universAAL with the configuration files and folders in etc folder, but by default distros are properly set up for common usage.
    • Open the Karaf distro folder, go to bin folder and execute the karaf script that fits your OS.
  8. Install universAAL features
    • Depending on which distro you downloaded, it may be empty the first time you run it. To install universAAL , or additional features if it is already installed, type
      features:list |grep AAL
      to get a list of universAAL features available.
    • Each feature installs everything it needs to run, i.e. if you choose an ontology feature, it will install all universAAL and all needed ontologies before it. The "uAAL-Basic.Coordinator" feature is the recommended core for typical basic runs.
  9. Install your apps
    • Once you have developed your apps, you can install them in the Karaf distro through different methods:
      • Place the app jar in the deploy folder of the Karaf distro. Every jar file placed in this folder is automatically installed, and uninstalled if it is removed. This is only recommended for tests - the start order is not reliable.
      • Manually install the bundle, using the command install. For bundles compiled with Maven this is like install mvn:groupId/artifactId/version (add wrap: before mvn: if it's a jar library rather than a OSGi bundle).
      • Create a Karaf feature that includes your app/s in the right order, then register the feature in Karaf and then install it.
  10. Debug
    • The Karaf distro from the repository is already set up to be debug-able. To debug from Eclipse, create a new debug configuration from Run > Debug Configurations > Remote Java Application > New. Name the newly created config and edit its Connection Properties to host: localhost, and port: 5005.
    • Once the Karaf distro is running, select the above debug configuration from Eclipse and click Debug. Any breakpoint you set in your code or in universAAL source code will interrupt like debugging as usual.

Just run in OSGI

These instructions are for running universAAL in non-developer environments or user deployments. In other words, it's for just making universAAL run, not developing or debugging.

  1. Install Java JDK
  2. Download Karaf Distro
    • You can download the Karaf distro as explained in the above instructions or, if you already have a folder of a Karaf distro downloaded somewhere, you can copy/paste it to the destination where you want it to run, e.g. another computer.
  3. Run Karaf
    • You can configure Karaf and universAAL with the configuration files and folders found in etc folder, but by default distro is properly set up for common usage.
    • Open the Karaf distro folder, go to bin folder and execute the karaf script that fits your OS.
  4. Install universAAL features and apps
    • Follow the steps mentioned above to install universAAL features and your own apps and features.
    • You just need to do this once. Subsequent executions will carry over the apps and features installed before, even if you copy them into other computers.
  5. Deploy
    • Once you have a Karaf distro folder fully set up to your liking and with all the apps you want on it, you can simply copy and paste it to whatever other location or computer (provided that you adequately configure the properties for that computer, e.g. user name, addresses and similar).

Setup, build, run and debug in Android

These instructions are for developers willing to build the universAAL Android App source code themselves or just inspect it, but are also helpful for developers willing to implement their own universAALized Android Apps. This is a step-by-step summary of the detailed instructions in the Native Android repository wiki.

  1. Install Java JDK
  2. Install Android SDK
    • Download the SDK from http://developer.android.com/sdk/index.html#Other
    • Remember to setup the ANDROID_HOME environment variable to the SDK folder.
    • Start the SDK and download the versions of Android and extras you may want. For universAAL, use at least 2.3.3.
  3. Install Eclipse or Android Studio
  4. Download source code
    • Clone or download the Native Android repository: https://github.com/universAAL/nativeandroid .
      • Android Studio: Switch the repository to the gradle branch. Import the mw.container.android project and that is all.
      • Eclipse IDE: Import the project mw.container.android in Eclipse (File > Import > General > Existing Projects into Workspace). The project will contain errors, that is normal.
        • You will need to import the Google Play Services library project as explained in http://developer.android.com/google/play-services/setup.html#Setup . Make sure you have selected "Using Eclipse with ADT" from the drop-down.
        • Once imported, right click mw.container.android, go to properties > Android. Remove the wrong library from the box. Click on "Add" and select the one you just imported.
  5. Build source code
    • The mw.container.android project should now be ready to build as any other Android application
  6. Install and run apps
    • Because of how universAAL App works, it is recommended that you first install your universAALized apps before running universAAL App.
    • You can install, open, debug and export the universAAL App just like any other Android App.
    • When you open the universAAL App for the first time, you should configure it properly. Follow the instructions in the Native Android repository wiki.
    • Once the settings are configured, start the universAAL background service with the "Start" option in the settings screen.

Just run in Android

  1. Download universAAL App
  2. Run universAAL App
    • When you open the universAAL App for the first time, you should configure it properly. Follow the instructions in the Native Android repository wiki.
    • Once the settings are configured, start the universAAL background service with the "Start" option in the settings screen.

Support:

Found a problem?
  • Report suggestions, missing, outdated or wrong documentation creating an Issue with "documentation" tag

Clone this wiki locally