...
This should be used for the first configuration retrieval, or to force a specific host different from what was specified in the configuration
Expand | ||
---|---|---|
| ||
In the case where no configuration is previously available, a basic configuration must be created prior to any configuration attempt. It must contain the following TLV DO: TerminalConfiguration(0xFF01) containing POIID(0xDF9F32) If using the AmadisTLV helpers, this can be achieved with: |
Code Block | ||
---|---|---|
| ||
// Load or initialise an empty configuration - see the [Minimal Configuration Required] section for more information byte[] configuration = { ... }; ConfigurationResult result = AmadisTMSModule.DoConfiguration(connectionProvider, configuration, "hostname:port"); // Inspect and use the result Object if (result.isSuccess()) { Log.d("config", "Configuration attempt was successful"); // Configuration attempt was successful - this is the new valid configuration and should replace the old one. configuration = result.getConfiguration(); // It is important to always keep the Connection Provider up to date with the current configuration connectionProvider.setConfiguration(configuration); } else { // The textual reason for a failure is provided Log.d("config", "Configuration attempt failed: " + result.getError()); } |
...