Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Tie libcouch to specific version of binaries

  • Loading branch information...
commit 720b79748e65df4aed7ad13c6e13f7ba3f8579e7 1 parent 20d9d68
Dale  Harvey daleharvey authored
BIN  assets/couchbase-1.0-dp-be9fe2f.tgz.jpg
BIN  assets/release-0.1.tgz.jpg
6 src/com/couchbase/libcouch/CouchDB.java
@@ -9,6 +9,7 @@
9 9
10 10 public class CouchDB {
11 11
  12 + private final static String defaultRelease = "couchbase-1.0-dp-be9fe2f";
12 13 private static String releaseName;
13 14
14 15 private static ICouchService couchService;
@@ -35,11 +36,14 @@ public void onServiceDisconnected(ComponentName className) {
35 36 }
36 37 };
37 38
  39 + public static ServiceConnection getService(Context ctx, ICouchClient client) {
  40 + return getService(ctx, defaultRelease, client);
  41 + }
  42 +
38 43 public static ServiceConnection getService(Context ctx, String release, ICouchClient client) {
39 44 releaseName = release;
40 45 couchClient = client;
41 46 ctx.bindService(new Intent(ctx, CouchService.class), mConnection, Context.BIND_AUTO_CREATE);
42 47 return mConnection;
43 48 }
44   -
45 49 }
7 src/com/couchbase/libcouch/CouchService.java
... ... @@ -1,5 +1,7 @@
1 1 package com.couchbase.libcouch;
2 2
  3 +import java.io.FileNotFoundException;
  4 +import java.io.IOException;
3 5 import java.io.PrintWriter;
4 6 import java.io.StringWriter;
5 7 import java.net.URL;
@@ -125,7 +127,10 @@ void installCouch(final String pkg) {
125 127 public void run() {
126 128 try {
127 129 CouchInstaller.doInstall(pkg, mHandler, service);
128   - } catch (Exception e) {
  130 + } catch (FileNotFoundException e) {
  131 + Message.obtain(mHandler, CouchService.ERROR, e).sendToTarget();
  132 + e.printStackTrace();
  133 + } catch (IOException e) {
129 134 e.printStackTrace();
130 135 }
131 136 }

0 comments on commit 720b797

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