FAQ – Developing on android

How do I access CouchDB on my computer

$ adb forward tcp:5985 tcp:5984

Will let you access CouchDB via http://127.0.0.1:5985/_utils

How do I view the CouchDB / Console logs

$ adb logcat

Something broke?

That isnt a question, but please email me at dale@couchbase.com with as much information as possible. The output from $ adb logcat is extremely useful.

How do I build CouchDB for Android myself?

You dont need to build CouchDB yourself to program against it, but if you really want to then there are instructions on the CouchDB wiki

Much thanks to Matt Adams.

How do I use CouchApp to push to my phone?

The same way you push to any other CouchDB, you need to have set up forwaring first, my .couchapprc file looks like:

{

"env" : {

"default" : {

"db" : "http://myname:mypass@127.0.0.1:5984/couchnotes"

},

"android" : {

"db" : "http://com_arandomurl_couchnotes:pass@127.0.0.1:5985/couchnotes-org_android_couchnotes"

}

}

}

I tried to create a database with name X and it doesnt exist?

You cant directly create databases as they may conflict with other applications, your databases will be created with your packagename appended (with periods replaced by underscores) so the database created for CouchNotes is names couchnotes-com_arandomurl_couchnotes

How do I find out the credentials to CouchDB databases?

When you create a database you provide a password, a user is created with the username being the package name of your app with periods replaced with underscores (for example com_arandomurl_couchnotes) and they are set as admin on any databases you create.

CouchUtils.java provides a readOrGeneratePass function to help generate and store a password, you can find the generated password by running:

adb shell cat /data/data/com.myname.myapp/files/com_myname_myapp.passwd

Click on the menu button while futon is open and select Admin Password

Is my data really secure?

No, although the SDK provides seperation between applications, currently Android CouchDB stores all data on the SD Card of your phone due to the size of the data. Other applications can access your data directly though the SD Card.

I want a native app, not a CouchApp

The process for building a native application that uses CouchDB is exactly the same, just include libcouch-android as a library to your project, ICouchService.aidl are the functions you use to control CouchDB

How big is CouchDB? / CouchDB is too big for my app

Currently CouchDB is around 17MB uncompressed (about a 10MB download), There is a lot of work being done to reduce the size for both downloading and runtime memory footprint.

How do I use my own CouchApp

$ couchapp push --export > filename.json

Will produce a json file that can be loaded into Couch, the ExampleCouchApp.java will look for a json file in the assets folder for every database that is bootstrapped.

How do I access Geolocation etc from my CouchApp?

PhoneGap is a library that allows you to access native API’s via Javascript and is an excellent compliment to CouchDB on Android.

How do I publish my App?

CouchDB Reloads when I change orientation

Android by default will destroy your activity when your phone changes orientation, you can use

android:configChanges="keyboardHidden|orientation"

couchdb android,CouchDB on android 入门相关推荐

  1. flex+android+教程,android开发flex4.5入门教程.pdf

    android开发flex4.5入门教程 中国矿业大学教务部 教务通知(2013 )第33 号 关于做好各级"大学生创新训练计划" 项目中期检查和结题验收的通知 各学院: 为加强我 ...

  2. 1、一、Introduction(入门): 0、Introduction to Android(引进到Android)

    一.Introduction(入门) 0.Introduction to Android(引进到Android) Android provides a rich application framewo ...

  3. Android渗透测试Android渗透测试入门教程大学霸

    Android渗透测试Android渗透测试入门教程大学霸 第1章  Android渗透测试 Android是一种基于Linux的自由及开放源代码的操作系统,主要用于移动设备,如智能手机.平板等.目前 ...

  4. Android 音视频开发入门指南

    最近收到很多网友通过邮件或者留言说想学习音视频开发,该如何入门,我今天专门写篇文章统一回复下吧. 音视频这块,目前的确没有比较系统的教程或者书籍,网上的博客文章也都是比较零散的,希望我后面能挤出时间整 ...

  5. android自定义美颜相机完整程序,Android OpenGL ES从入门到进阶(一)—— 五分钟开发一款美颜相机...

    源码链接:https://github.com/smzhldr/AGLFramework 一.前言 商店里有数十款的美颜相机类产品,其实现原理基本上都是以OpenGL ES为核心的特效处理,大神可以忽 ...

  6. Android绘制自定义控件,Android自定义控件绘制基本图形基础入门

    本文讲述绘制android自定义各种图形效果,为自定义控件的入门篇 相关视频链接: android自定义控件系列 android视频全系列 绘制点–这个控件只需要在布局中引用或者代码中new 即可,下 ...

  7. Android游戏开发的入门实例

         在Android系统上开发游戏是Android开发学习者所向往的,有成就感也有乐趣,还能取得经济上的报酬.那怎样开发Android游戏呢?下面介绍一个简单的入门实例.        一.创建 ...

  8. 8步教你打开Android之门 NDK入门教程

    这是一篇Android NDK开发的入门教程,在这一教程结束后,你将创建你自己的项目,从Java代码简单地调用原生C语言代码. 本文为一篇外文翻译,我们将介绍如何学习安装 Android NDK 并开 ...

  9. Android视频录制从不入门到入门系列教程(一)————简介

    一.WHY Android SDK提供了MediaRecorder帮助开发者进行视频的录制,不过这个类很鸡肋,实际项目中应该很少用到它,最大的原因我觉得莫过于其输出的视频分辨率太有限了,满足不了项目的 ...

最新文章

  1. c语言中的-代表什么意思
  2. ODrive踩坑(四)AS5047P-SPI绝对值磁编码器,不需每次上电校准无刷电机,直接上电可用
  3. 文件完整性的检测与监控
  4. 转载——sunlogin远程控制安装bug解决
  5. python与plc进行串口通信,寄存器写数据 欧姆龙plc
  6. [ERP/鼎捷E10][计划管理]主生产计划MPS
  7. VMware卸载后再安装时网络连接处没有虚拟网卡
  8. Windows系统下查询本机IP地址和MAC地址
  9. 习惯的力量在于不由主——知道顶个球用,成为习惯才是你的
  10. 解决html5手机端滑动卡顿的现象
  11. iOS Camera照相机
  12. 逻辑函数常用的描述方法及相互间的转化
  13. 【新版hcie云计算实验难点在哪?】
  14. BZOJ 4808(马-二分图最大独立集)
  15. Mac新手操作指南(四)
  16. 【机器学习】课程笔记16_大规模机器学习(Large Scale Machine Learning)
  17. 如何制作启动盘U盘(纯净版无捆绑)
  18. 【新书推荐】【2019.12】二十一世纪的人工智能(第三版)
  19. jvm常用参数 对jdk7 jdk8
  20. 【Python】EasyDict:Make Dictionary Easier

热门文章

  1. 利用webQQ实现聊天机器人。。
  2. 商品评论中的实体情感分析
  3. 卖全球成为现实,流星汇聚跨境电商响应号召推动企业出海
  4. 微信小程序中,真机和模拟器效果不一样
  5. 什么样的人更适合做产品经理?
  6. 青蛙过河问题(递归算法)
  7. 本地配置hosts文件
  8. nginx反向代理及负载均衡使用详解
  9. 一个Web系统OA界面设计和开发
  10. 基于特性(Attribute)的实体属性验证方案设计