public static interface Switch.NotifyActivated
active
property with the Switch
isActive()
method:
final Switch switcher; ... switcher.connect(new Switch.NotifyActivated() { public void onNotifyActivated(Switch source) { if (source.isActive()) { System.out.printl("WiFi is on."); } else { System.out.printl("WiFi is off."); } } });
Modifier and Type | Method and Description |
---|---|
void |
onNotifyActivated(Switch source) |
void onNotifyActivated(Switch source)