A framework for using an Android Wear watch as a remote controller.
Java
Permalink
Failed to load latest commit information.
SpaceRemote
.gitignore
LICENSE
README.md

README.md

WeaRemote

WeaRemote is a framework that allows you to easily use an Android Wear watch as a remote controller.

In your Wear project

  • Add a dependency to the wearemote project
  • Extend SensorActivity
  • Add the desired sensors
addSensor("my_accelerometer", Sensor.TYPE_ACCELEROMETER, SensorManager.SENSOR_DELAY_GAME);
  • Override method onGotSensorData
@Override
protected void onGotSensorData(WearSensor sensor, SensorEvent event)
{
  if (sensor.getName().equals("my_accelerometer"))
    sendSensorData("accelerometer_data_Y", event.values[1]);
}

In your Mobile project

  • Add a dependency to the wearemote project
  • Extend ReceiverActivity
  • Override method OnReceivedRemoteValue
@Override
protected void OnReceivedRemoteValue(String type, float value)
{
  if (type.equals("accelerometer_data_Y")
    moveSpaceship(value);
}