Closed kundelstein closed 5 years ago
Ok, thanks. I fixed it and added a comment that it will throw an exception if you did not press the bridge button.
Thanks, looks great! BTW. Is this the correct way of handling the press? If so - is there any way to get a feedback that user pressed the button (so we don't have to wait any longer)? (sorry for asking here, not sure where I supposed to ask):
yes, but you don't know when the user has pressed the button. So you have to fix that yourself in your app UI. For example you can make a button in your app that says press this button after you pressed the bridge button. Or you can call RegisterAsync every 5 seconds untill it succeeds. Different ways to handle this and it's up to the app to make a nice implementation.
Thank you for your answer!
README.md has a bug in example implementation:
command.Alert = Alerts.Once; should be: command.Alert = Alert.Once;
command.Effect = Effects.ColorLoop; should be command.Effect = Effect.ColorLoop;
Also it is very unclear how one should Register the Application with: var appKey = await client.RegisterAsync("mypersonalappname", "mydevicename"); It will throw exception right away as button on the bridge was not pressed. What is intended use case scenario with this? I think it should be at least mentioned here (I know I'm a bit stupid, in original Philips implementation it is done by callbacks, here I have no clue).