Creating new project¶
In NeoMAD Bundle, create a new project:
- File > New > NeoMAD Project.
- Choose a project name (HelloNeomad) :
- Choose a URS name :
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)
- 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)
Learning the basics¶
Set up your project¶
<?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 menupackagename: name of the application’s root packagevendor: name of the application’s vendordescription: application’s descriptionversion: version number (3 numbers from 0 to 99, separated by dots)srcpath: relative path to the source files directoryoutputpath: 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.
