reader: bump the reader project to 0.3 vanadium release

The 0.3 release fixes the native libraries issues.

Fixed the API changes introduced in 0.3.

Change-Id: I289d04514ac4d9f3670a4e84458490aa609c5855
diff --git a/android/app/build.gradle b/android/app/build.gradle
index bf00685..5744842 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -1,6 +1,7 @@
 buildscript {
     repositories {
         mavenCentral()
+        jcenter()
     }
     dependencies {
         // This introduces the Android plugin to make building Android
@@ -8,7 +9,7 @@
         classpath 'com.android.tools.build:gradle:1.3.0'
         // We are going to define a custom VDL service. The Vanadium
         // Gradle plugin makes that easier, so let's use that.
-        classpath 'io.v:gradle-plugin:0.1'
+        classpath 'io.v:gradle-plugin:0.9'
         // Use the Android SDK manager, which will automatically download
         // the required Android SDK.
         classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.0'
@@ -37,6 +38,7 @@
 
 repositories {
     mavenCentral()
+    jcenter()
 }
 
 android {
@@ -80,7 +82,7 @@
     compile 'com.android.support:appcompat-v7:22.2.1'
     compile 'com.android.support:cardview-v7:22.2.1'
     compile 'com.android.support:recyclerview-v7:22.2.1'
-    compile 'io.v:vanadium-android:0.2'
+    compile 'io.v:vanadium-android:0.3'
     compile 'com.google.android.gms:play-services-analytics:8.3.0'
 }
 
diff --git a/android/app/src/main/java/io/v/android/apps/reader/db/SyncbaseDB.java b/android/app/src/main/java/io/v/android/apps/reader/db/SyncbaseDB.java
index db48714..ca197d0 100644
--- a/android/app/src/main/java/io/v/android/apps/reader/db/SyncbaseDB.java
+++ b/android/app/src/main/java/io/v/android/apps/reader/db/SyncbaseDB.java
@@ -35,6 +35,7 @@
 import io.v.android.v23.services.blessing.BlessingService;
 import io.v.impl.google.naming.NamingUtil;
 import io.v.impl.google.services.syncbase.SyncbaseServer;
+import io.v.v23.InputChannels;
 import io.v.v23.VIterable;
 import io.v.v23.context.CancelableVContext;
 import io.v.v23.context.VContext;
@@ -649,8 +650,8 @@
 
                 // Read existing data from the table.
                 Table table = batch.getTable(mTableName);
-                VIterable<KeyValue> kvs = sync(table.scan(
-                        mCancelableVContext, RowRange.range("", "")));
+                VIterable<KeyValue> kvs = InputChannels.asIterable(sync(table.scan(
+                        mCancelableVContext, RowRange.range("", ""))));
                 for (KeyValue kv : kvs) {
                     @SuppressWarnings("unchecked")
                     E item = (E) VomUtil.decode(kv.getValue(), mClass);
@@ -671,8 +672,8 @@
         private void watchForChanges() {
             try {
                 // Watch for new changes coming from other Syncbase peers.
-                VIterable<WatchChange> watchStream = sync(mLocalSB.db.watch(
-                        mCancelableVContext, mTableName, "", mResumeMarker));
+                VIterable<WatchChange> watchStream = InputChannels.asIterable(sync(
+                        mLocalSB.db.watch(mCancelableVContext, mTableName, "", mResumeMarker)));
 
                 Log.i(TAG, "Watching for changes of table: " + mTableName + "...");