4

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 change very frequently.

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

degeeman
  • 135
  • 1
  • 6

3 Answers3

1

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)

Dale Harvey
  • 1,203
  • 7
  • 14
  • I would like to use pull on my phone, but mobile futon's replicator does not work at all and I am not able to create any documents in mobile futon... as previously mentioned, the URL provided by mobile futon is not working – degeeman Aug 12 '11 at 12:09
0

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

degeeman
  • 135
  • 1
  • 6
0

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!

gaara87
  • 2,087
  • 3
  • 21
  • 43