Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

doing things in the editor

  • Loading branch information...
commit 7d06a6d53aeb367424bae69011315ef07dee32b7 1 parent 72d8c3b
@jchris jchris authored
View
BIN  bin/HelloWorld.apk
Binary file not shown
View
BIN  bin/classes.dex
Binary file not shown
View
BIN  bin/com/couchbase/helloworld/HelloWorldActivity$1.class
Binary file not shown
View
17 src/com/couchbase/helloworld/HelloWorldActivity.java
@@ -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);
Please sign in to comment.
Something went wrong with that request. Please try again.