Declaring Extensions in project

In the URS File

To use an extension in the source code, it must be declared in the URS file in the extensions section in the <extension> tag. See urs extension documentation to have more details about urs extensions declarations.

Permissions

Some extensions will access sensitive user’s data in the device and permissions will be required by the operating system. Be sure to add the permissions declaration in the URS file that are necessary for the application to work.

Each NeoMAD extension documentation indicates the permissions to add in the project.

System library dependencies

Some extensions require other libraries (third-party or system) to work. They must be added in the URS file in the specific section. Refer to the urs platform library documentation to see how to add libraries to the project.

Each NeoMAD extension documentation indicates the libraries to add in the project.

Importing an extension in the IDE

  • Open the NeoMAD eclipse bundle (or an Eclipse with the NeoMAD plug-in)
  • Open the project for which the extensions must be added. For the example, HelloWorldExample project is used
Import extension - open project
  • Open the Java Build Path of the project using the the menu Project -> Properties or by right clicking on Referenced Libraries -> Build Path -> Configure Build Path
Import extension - build path GenericAPI
  • Click on the Add External JARS... button and browse the file system to the place where the extension is. Be sure to accept all file types.
Import extension - select nar file
  • Select the extension and validate. The build path should look like this
Import extension - build path GenericAPI and Agenda
  • Use the extension in the code with the autocompletion
Import extension - autocompletion