March 2018
Beginner to intermediate
410 pages
10h 40m
English
We then analyze the set of features presented by each item, or component. If any of them present the namespace defined in XEP-0347 for Thing Registries, we use the JID presented by the component as the address for the registry:
try
{
Item Item2 = (Item)e2.State;
if (e2.HasFeature(ThingRegistryClient.NamespaceDiscovery))
{
Log.Informational("Thing registry found.", Item2.JID);
await RuntimeSettings.SetAsync(
"ThingRegistry.JID", Item2.JID);
await this.RegisterDevice(Item2.JID);
}
}
catch (Exception ex)
{
Log.Critical(ex);
}
Read now
Unlock full access