Hi,
Help Please I tried this code but without success (return Value =0)
public class RemoteActivity extends Activity
Code:
View.OnClickListener TestListener = new View.OnClickListener() {
public void onClick(View v) {
final IControlManager cm = ManagerFactory.getControlManager(
new INotifiableController() {
public void onWrongConnectionState(int state, INotifiableManager manager, Command<?> source) {
}
public void onError(Exception e) {
}
public void onMessage(String message) {
}
public void runOnUI(Runnable action) {
}
});
cm.getVolume(new DataResponse<Integer>() {
public void run() {
}
}, getApplicationContext());
}
};
Idem if I replace getApplicationContext() by null
In public class ControlManager extends AbstractManager implements IControlManager, INotifiableManager
Code:
public void getVolume(final DataResponse<Integer> response, final Context context) {
mHandler.post(new Command<Integer>(response, this) {
@Override
public void doRun() throws Exception {
Log.i(Tag,"Volume B");
response.value = control(context).getVolume(ControlManager.this);
Log.i(Tag,"Volume = " + response.value.doubleValue());
Log.i(Tag,"Volume = " + response.value.intValue());
}
});
}
Result :
Volume = 0.0
Volume = 0
A