开发者

CouchDB Replication to and from Android

I'm new to Android and CouchDB and have a few questions.

Is it actually possible to replicate the contents of a Windows CouchDB database to Android without developing some sort of app?

CouchApp is installed on my Motorola Defy and it says CouchDB is running on http://ip:port/. With the build in browser I cannot verify that information, because the URL cannot be opend (neither from the phone nor from my pc), but http://localhost:port/ works fine.

I tried setting bind_address in /sdcard/Android/data/com.aranomurl.couchapp/couchdb/etc/couchdb/local.ini to 0.0.0.0 and to the actual IP, but neither one changes anything.

Using the futon replicator I get the error message "Replication failed: could not open http://ip:port/".

As a correlating question, I wonder how continous replication is supposed to work for mobile devices, since IP address and port seem to ch开发者_如何学Goange very frequently.

(edited once to clarify that mobile futon's URL is not working)


0.0.0.0 will listen on all interfaces so it will be accessible as long as your device is, Generally on devices its a good idea to pull from the phone as opposed to push to it, then you dont need to worry about the port switching.

right now your android and windows machine cant talk to each other, this could be a variety of problems related to your local network, when you can access the url that is displayed in mobilefuton, then your replication should be fine (replicating against a public host is also an easy way to get started)


Problem solved with newer CouchDB App for Android https://market.android.com/details?id=com.daleharvey.mobilefuton Built in [continious] replication is working fine...


As mentioned earlier, the problem is solved in the newer version of the app.

But just incase replication doesn't work,

Make sure you have the couchdb port open and accessible universally/within the network in which you want to access.

Try initiating replication from Android to Remote server always, because, as you said, Android's IP might be hard to track down and keep static!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜