March 2018
Beginner to intermediate
410 pages
10h 40m
English
In the same way, we need to react to the thing being disowned. This can also happen either when the device is online or offline. If it happens offline, we detect it when we update our registration in the Thing Registry, by checking the response arguments. When the device has been disowned, we make sure to forget the identity of the previous owner, and re-register the device as a claimable device again:
this.registryClient.UpdateThing(MetaInfo, async (sender, e) => { try { if (e.Disowned) { await RuntimeSettings.SetAsync( "ThingRegistry.Owner", string.Empty); await this.RegisterDevice(MetaInfo); } else if (e.Ok) Log.Informational( "Registration update successful."); else { Log.Error("Registration update ...Read now
Unlock full access