Permalink
Browse files

doing things in the editor

  • Loading branch information...
1 parent 72d8c3b commit 7d06a6d53aeb367424bae69011315ef07dee32b7 @jchris jchris committed Aug 4, 2011
View
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
@@ -40,22 +40,19 @@ public void exit(String error) throws RemoteException {
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 startUrl = "http://" + host + ":" + Integer.toString(port) + "/grocery-sync/_design/grocery/index.html";
String sessionUrl = "http://" + host + ":" + Integer.toString(port) + "/_session";
String syncpoint = "http://couchbase.ic.ht/grocery-sync";
String localdb = "grocery-sync";
// trigger replication with this json
String startRep = "{\"source\":\""+ syncpoint +"\", \"target\":\""+ localdb +"\", \"create_target\":true}";
String replicateUrl = "http://" + host + ":" + Integer.toString(port) + "/_replicate";
-// Log.d("ok", "replicate");
-// try {
-// Log.INFO("ok", "replicate");
-// AndCouch req = AndCouch.post(replicateUrl, startRep, null);
-//// Log.INFO("ok", "replicating "+req.status+" "+startRep);
-// } catch (JSONException e) {
-// // TODO Auto-generated catch block
-// e.printStackTrace();
-// }
+ try {
+ AndCouch req = AndCouch.post(replicateUrl, startRep);
+ } catch (JSONException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
setContentView(webView);
webView.loadUrl(startUrl);

0 comments on commit 7d06a6d

Please sign in to comment.