issues with reading battery state
I tried to follow the instructions on the android documentation but I am receiving an "Must Override a Superclass method" error on the Override above public void success. I have the env sensor.
public void getBattery()
{
try{
settingModule = mwBoard.getModule(Settings.class);
} catch (UnsupportedModuleException e){
Log.i("MainActivity", String.format("getBattery unsupported module"));
return;
}
settingModule.routeData().fromBattery().stream("battery_ state").commit().onComplete(ne w AsyncOperation. CompletionHandler<Timer. Controller>()
{
@Override
public void success(RouteManager result)
{
result.subscribe("battery_state", new RouteManager.MessageHandler() {
@Override
public void process(Message message) {
Log.i("MainActivity", "Battery state: " + message.getData(BatteryState.class));
}
});
}
});
settingModule.readBatteryState();
}
This discussion has been closed.
Comments
RouteManager
notTimer.Controller
.