├── .gitignore ├── res ├── drawable-hdpi │ └── icon.png ├── drawable-ldpi │ └── icon.png ├── drawable-mdpi │ └── icon.png ├── values │ └── strings.xml └── layout │ ├── missing_couchapp.xml │ └── install_couchdb.xml ├── jni ├── Android.mk ├── com_couchbase_android_ErlangThread.h ├── erl_int_sizes_config.h ├── erl_drv_nif.h ├── erl_printf.h ├── android_jni_nif.cpp ├── com_couchbase_android_ErlangThread.cpp ├── erl_nif.h └── erl_nif_api_funcs.h ├── .classpath ├── project.properties ├── src └── com │ └── couchbase │ └── android │ ├── ICouchbaseService.java │ ├── ICouchbaseDelegate.java │ ├── ErlangThread.java │ ├── Intents.java │ ├── CouchbaseService.java │ ├── CouchbaseMobile.java │ └── CouchbaseInstaller.java ├── script ├── permission-INTERNET.xsl ├── permission-ACCESS_NETWORK_STATE.xsl ├── permission-WRITE_EXTERNAL_STORAGE.xsl ├── couchbase-service.xsl ├── classpath.otp.xsl ├── couchbase.xml ├── classpath.couchbase.xsl ├── project.xsl ├── CouchbaseBuilder.launch.template └── couchbase-internal.xml ├── AndroidManifest.xml ├── .project ├── proguard.cfg ├── doc └── README.txt └── README.markdown /.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | gen 3 | local.properties 4 | .DS_Store 5 | -------------------------------------------------------------------------------- /res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbaselabs/Android-Couchbase/HEAD/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbaselabs/Android-Couchbase/HEAD/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/couchbaselabs/Android-Couchbase/HEAD/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CouchAppLauncher 5 | Click to Install CouchDB 6 | Congratulations, CouchAppLauncher works correctly! 7 | 8 | -------------------------------------------------------------------------------- /jni/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH := $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_MODULE := com_couchbase_android_ErlangThread 6 | LOCAL_SRC_FILES := com_couchbase_android_ErlangThread.cpp android_jni_nif.cpp 7 | LOCAL_LDLIBS := -llog -ldl -L$(LOCAL_PATH) -L$(ERL_HOME)/bin/arm-unknown-eabi/ -lbeam 8 | 9 | include $(BUILD_SHARED_LIBRARY) 10 | -------------------------------------------------------------------------------- /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system use, 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | 10 | android.library=true 11 | # Project target. 12 | target=android-7 13 | -------------------------------------------------------------------------------- /src/com/couchbase/android/ICouchbaseService.java: -------------------------------------------------------------------------------- 1 | package com.couchbase.android; 2 | 3 | 4 | /** 5 | * The public interface to the Couchbase service 6 | */ 7 | 8 | interface ICouchbaseService 9 | { 10 | 11 | /** 12 | * Starts Couchbase service asynchronously. Delegate will be notified 13 | * when the service is ready. 14 | * 15 | * @param callback the delegate to receive notifications from this service 16 | */ 17 | void startCouchbase(ICouchbaseDelegate callback); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /script/permission-INTERNET.xsl: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /script/permission-ACCESS_NETWORK_STATE.xsl: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /script/permission-WRITE_EXTERNAL_STORAGE.xsl: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /script/couchbase-service.xsl: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /script/classpath.otp.xsl: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/com/couchbase/android/ICouchbaseDelegate.java: -------------------------------------------------------------------------------- 1 | package com.couchbase.android; 2 | 3 | /** 4 | * The delegate interface a client should implement to receive 5 | * notifications of important events from the Couchbase service 6 | * 7 | */ 8 | public interface ICouchbaseDelegate 9 | { 10 | 11 | /** 12 | * Callback to notify when Couchbase has started 13 | * 14 | * @param host the host Couchbase is listening on 15 | * @param port the port Couchbase is listening on 16 | */ 17 | void couchbaseStarted(String host, int port); 18 | 19 | /** 20 | * Callback for notification that Couchbase has exited 21 | * 22 | * @param error an error message describing the reason Couchbase exited 23 | */ 24 | void exit(String error); 25 | } -------------------------------------------------------------------------------- /res/layout/missing_couchapp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /script/couchbase.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /script/classpath.couchbase.xsl: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /script/project.xsl: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.ui.externaltools.ExternalToolBuilder 16 | full,incremental, 17 | 18 | 19 | LaunchConfigHandle 20 | <project>/.externalToolBuilders/CouchbaseBuilder.launch 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | Android-Couchbase 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /jni/com_couchbase_android_ErlangThread.h: -------------------------------------------------------------------------------- 1 | /* DO NOT EDIT THIS FILE - it is machine generated */ 2 | #include 3 | /* Header for class com_couchbase_android_ErlangThread */ 4 | 5 | #ifndef _Included_com_couchbase_android_ErlangThread 6 | #define _Included_com_couchbase_android_ErlangThread 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | /* 11 | * Class: com_couchbase_android_ErlangThread 12 | * Method: start_erlang 13 | * Signature: (Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)V 14 | */ 15 | JNIEXPORT void JNICALL Java_com_couchbase_android_ErlangThread_start_1erlang 16 | (JNIEnv *, jclass, jstring, jstring, jobjectArray); 17 | 18 | /* 19 | * Class: com_couchbase_android_ErlangThread 20 | * Method: send_bin 21 | * Signature: ([BJ)V 22 | */ 23 | JNIEXPORT void JNICALL Java_com_couchbase_android_ErlangThread_send_1bin 24 | (JNIEnv *, jclass, jbyteArray, jlong); 25 | 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /res/layout/install_couchdb.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | 19 | 20 |