Creating new project

In NeoMAD Bundle, create a new project:

  1. File > New > NeoMAD Project.
  2. Choose a project name (HelloNeomad) :
New NeoMAD Project
  1. Choose a URS name :
Project URS

This file defines the project content (name, author, version, resources, permissions, etc). The entry point of the application is automatically filled (ApplicationClass), an the the first screen name too (ScreenClass)

Java Build Path
  1. Click then on the Finish button.

A NeoMAD project is similar to any Java project, with Java source files organized in packages.

  • src: source folder containing Java files
  • res: resource folder
  • out: output folder for binaries
  • urs file (project description)
Project structure

Learning the basics

Set up your project

URS
<?xml version="1.0"?>
<urs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="http://www.neomades.com/XSD/4.0.0/urs.xsd">
        <parameters>
                <mainclassname>HelloNeomadApp</mainclassname>
                <applicationname>HelloNeomad</applicationname>
                <packagename>com.example.helloneomad</packagename>
                <vendor>vendor name</vendor>
                <version>1.0.0</version>
                <srcpath>src</srcpath>
                <outputpath>out</outputpath>
        </parameters>
</urs>

Within the URS file, the parameters element contains general information about the project:

  • mainclassname: name of the application’s entry point.
  • applicationname: name that will be displayed in the mobile device menu
  • packagename: name of the application’s root package
  • vendor: name of the application’s vendor
  • description: application’s description
  • version: version number (3 numbers from 0 to 99, separated by dots)
  • srcpath: relative path to the source files directory
  • outputpath: relative path to the directory where binaries will be generated - if this doesn’t exist, it will be created by NeoMAD

All the tags information is required except the description one.

Entry point

/**
 * Application entry point
 */
public final class HelloNeomadApp extends Application {
        protected void onStart(Controller controller) {
                controller.pushScreen(HelloNeomadScreen.class);
        }
}

The onStart method is called when the application starts. In the example above, a screen is shown named HelloNeomadScreen.