diff options
Diffstat (limited to 'same-android/src/main/java/com/orbekk')
-rw-r--r-- | same-android/src/main/java/com/orbekk/same/VariableTestActivity.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/same-android/src/main/java/com/orbekk/same/VariableTestActivity.java b/same-android/src/main/java/com/orbekk/same/VariableTestActivity.java index b667d3a..46adb88 100644 --- a/same-android/src/main/java/com/orbekk/same/VariableTestActivity.java +++ b/same-android/src/main/java/com/orbekk/same/VariableTestActivity.java @@ -68,13 +68,14 @@ public class VariableTestActivity extends Activity { client.connect(); variable = client.createVariableFactory() .createString("TestVariable"); - variable.setOnChangeListener(onChangeListener); + variable.addOnChangeListener(onChangeListener); variable.set("Hello, World!"); displayVariable(); } @Override public void onStop() { super.onStop(); + variable.removeOnChangeListener(onChangeListener); client.disconnect(); } } |