Configuration > App Descriptor XML |
The descriptor file identifies your App to the HP Anywhere server. Add the descriptor file under the web resources, for example: at {PROJECT_HOME}\<myAppName>\<myAppName>-web\src\main\resources\<myAppName>-descriptor.xml
You do not need to define the development framework's resources in this file, as HP Anywhere automatically downloads these to the user device.
Element | Description |
---|---|
serviceName attribute of AppDescriptor element |
The ID of the App service described by this descriptor. This serviceName must be the same as the Spring bean implementation of AbstractBTOServiceEE. For example, if the App has: The same serviceName is also the ID of the App to be triggered in the js file. |
apiVersion |
The version to be used by the server when accessing the App Rest API. The apiVersion will be used in the future to support Apps that were compiled in the legacy |
AppVersion |
The version of the App. The AppVersion will be used in the future to differentiate between different versions of the same App deployed for different customers. |
vendorId | The App vendor ID to be displayed in the catalog. |
AppRootContext | The name of the root context where the service resides. For example, for sample-notes-web.war the context root is sample-notes-web . |
webResources | webResources defines the App supported clients and the files to be downloaded to client. For each form factor, define the required js file names |
formFactor | The supported form factors are DESKTOP,SMARTPHONE, and TABLET. |
jsName | JavaScript path name of the App to be injected to the client side. The path is relative to the root context. |
cssName | CSS path names for the App to be injected to the client side. The path is relative to the root context. |
hasSummaryData | True when implementing the summary data JS API. If true, the App summary is displayed under the MyApps tab in the HP Anywhere client. |
isOfflineSupported | True when offline mode is supported for the App and users can log on and work with the App when the device is not connected to the network. |
cache |
(Relevant only for DESKTOP form factor) Specifies if a resource is cached per version or forever. |
Example: Notes App descriptor file |
Copy Code
|
---|---|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <miniAppDescriptor serviceName="NOTES"> <apiVersion>1.0</apiVersion> <miniAppVersion>1.0</miniAppVersion> <vendorId>HP</vendorId> <connectionDetails> <miniAppRootContext>sample-notes-web</miniAppRootContext> </connectionDetails> <webResources> <webResource> <formFactor>DESKTOP</formFactor> <jsNames> <jsName cache="forever" >sdk/sencha-touch-all.js</jsName> <jsName>app-all.js</jsName> </jsNames> <cssNames> <cssName>resources/css/app.css</cssName> <cssName cache="forever">sdk/resources/css/sencha-touch.css</cssName> </cssNames> <isSencha>false</isSencha> </webResource> <webResource> <formFactor>SMARTPHONE</formFactor> <jsNames> <jsName>sdk/sencha-touch-all.js</jsName> <jsName>app-all.js</jsName> </jsNames> <cssNames> <cssName>resources/css/app.css</cssName> <cssName>sdk/resources/css/sencha-touch.css</cssName> </cssNames> <isSencha>false</isSencha> </webResource> <webResource> <formFactor>TABLET</formFactor> <jsNames> <jsName>sdk/sencha-touch-all.js</jsName> <jsName>app-all.js</jsName> </jsNames> <cssNames> <cssName>resources/css/app.css</cssName> <cssName>sdk/resources/css/sencha-touch.css</cssName> </cssNames> <isSencha>false</isSencha> </webResource> </webResources> <hasSummaryData>true</hasSummaryData> <isOfflineSupported>true</isOfflineSupported> </miniAppDescriptor> |