Skip to content
Browse files

logging

  • Loading branch information...
1 parent 7d06a6d commit 5602c683c29866fa89892d666a4476a3ad746bf1 @jchris jchris committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/com/couchbase/helloworld/HelloWorldActivity.java
View
4 src/com/couchbase/helloworld/HelloWorldActivity.java
@@ -39,6 +39,7 @@ public void exit(String error) throws RemoteException {
@Override
public void couchStarted(String host, int port) throws RemoteException {
// TODO Auto-generated method stub
+
WebView webView = new WebView(HelloWorldActivity.this);
String startUrl = "http://" + host + ":" + Integer.toString(port) + "/grocery-sync/_design/grocery/index.html";
String sessionUrl = "http://" + host + ":" + Integer.toString(port) + "/_session";
@@ -47,12 +48,15 @@ public void couchStarted(String host, int port) throws RemoteException {
// trigger replication with this json
String startRep = "{\"source\":\""+ syncpoint +"\", \"target\":\""+ localdb +"\", \"create_target\":true}";
String replicateUrl = "http://" + host + ":" + Integer.toString(port) + "/_replicate";
+ Log.e("hw", "HelloWorld has a Couch "+sessionUrl);
+
try {
AndCouch req = AndCouch.post(replicateUrl, startRep);
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
+ Log.e("hw", "repication complete "+replicateUrl);
setContentView(webView);
webView.loadUrl(startUrl);

0 comments on commit 5602c68

Please sign in to comment.
Something went wrong with that request. Please try again.