Android Display Volume on Remote (get.Volume)
#1
I am developing my own android interface from the last Official XBMC Remote Android App.

I want to display the volume on my Remote
I do not understand how to use getVolume from the Activity "RemoteActivity" Huh
Can you please tell me the code?

Thanks,
Reply
#2
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
Reply

Logout Mark Read Team Forum Stats Members Help
Display Volume on Remote (get.Volume)0