summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-03-02 16:50:44 +0100
committerKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-03-02 16:50:44 +0100
commitab9fadb6836737b0ec4f42fa1a0197ba9359d251 (patch)
tree4310255e896e99eea5eebf8e87b558bd44b4b4d6
parent4a358f6dfc38132d7c066268dab55f7e4b36a121 (diff)
Syntax hilighting of code example.
-rw-r--r--README.md44
1 files changed, 23 insertions, 21 deletions
diff --git a/README.md b/README.md
index 84ddec1..cd5ffe2 100644
--- a/README.md
+++ b/README.md
@@ -17,27 +17,29 @@ An incomplete list of implemented and planned features.
## Example
With Same you can share variables easily, like so:
- // First: Some setup to get all your devices connected to the same network.
- // Then, in your Activity:
- ClientInterfaceBridge client = new ClientInterfaceBridge(this);
- client.connect();
- try {
- // A VariableFactory is used to create distributed objects.
- VariableFactory variableFactory = client.createVariableFactory();
- Variable<String> myVariable = variableFactory.createString("MyVariable");
-
- // Set the variable.
- myVariable.set("Hello, Same!");
-
- // Run update() to get the most recent version.
- myVariable.update();
-
- // Get the current value.
- Log.i("The current value is: " + myVariable.get());
- } finally {
- // Always remember to disconnect.
- client.disconnect();
- }
+```Java
+// First: Some setup to get all your devices connected to the same network.
+// Then, in your Activity:
+ClientInterfaceBridge client = new ClientInterfaceBridge(this);
+client.connect();
+try {
+ // A VariableFactory is used to create distributed objects.
+ VariableFactory variableFactory = client.createVariableFactory();
+ Variable<String> myVariable = variableFactory.createString("MyVariable");
+
+ // Set the variable.
+ myVariable.set("Hello, Same!");
+
+ // Run update() to get the most recent version.
+ myVariable.update();
+
+ // Get the current value.
+ Log.i("The current value is: " + myVariable.get());
+} finally {
+ // Always remember to disconnect.
+ client.disconnect();
+}
+```
## Release log
Pre-1.0: A release is a milestone in the project. Whenever the system seems to