Using ODKCollect with CommCareHQ

hey allen,

sounds like you've gotten pretty far. i don't know the commcarehq api
for submitting data but maybe the folks from dimagi on this list can
help.

yaw

··· On Tue, Dec 14, 2010 at 07:55, Allen Machary wrote: > Hi > I have installed ODKCollect on Android Emulator, set-up ODKAggregates on > Google app engine. > then created some custom forms which i uploaded into my ODKAggregates then i > easly pull the forms to my ODKCollect. > sending data to Aggregates works perfectly. > But i would like to redirect data submission from ODK Collect to commcareHQ > i have already set-up commcareHQ in my local machine > could you please direct me on give me hints on how to go about this. > thanx > -- > Allen Machary. > >

hi allen,

you'll need to change the URL that collect posts to. from the main
screen in collect, press the menu softkey, choose "server preferences"
(only option) and modify the "Server" entry. for CCHQ, the url you
want is something like:

http://myCCHQServerOrIPAddress.com/receiver/submit/domainname

where you fill in the "myCCHQServerOrIPAddress.com" and "domainname"
with your particular details. make sure you don't have a trailing '/',
as there is an outstanding bug in collect where that is not handled.

brian

··· On Wed, Dec 15, 2010 at 1:06 AM, Yaw Anokwa wrote: > hey allen, > > sounds like you've gotten pretty far. i don't know the commcarehq api > for submitting data but maybe the folks from dimagi on this list can > help. > > yaw > > On Tue, Dec 14, 2010 at 07:55, Allen Machary wrote: >> Hi >> I have installed ODKCollect on Android Emulator, set-up ODKAggregates on >> Google app engine. >> then created some custom forms which i uploaded into my ODKAggregates then i >> easly pull the forms to my ODKCollect. >> sending data to Aggregates works perfectly. >> But i would like to redirect data submission from ODK Collect to commcareHQ >> i have already set-up commcareHQ in my local machine >> could you please direct me on give me hints on how to go about this. >> thanx >> -- >> Allen Machary. >> >> >

just chatted with Carl. I think the trailing '/' issue we had was
because we were running a local version of aggregate without a real
web server. doesn't seem like this is really an issue. (i'd still omit
it though...)

brian

··· On Wed, Dec 15, 2010 at 7:03 AM, Brian DeRenzi wrote: > hi allen, > > you'll need to change the URL that collect posts to. from the main > screen in collect, press the menu softkey, choose "server preferences" > (only option) and modify the "Server" entry. for CCHQ, the url you > want is something like: > > http://myCCHQServerOrIPAddress.com/receiver/submit/domainname > > where you fill in the "myCCHQServerOrIPAddress.com" and "domainname" > with your particular details. make sure you don't have a trailing '/', > as there is an outstanding bug in collect where that is not handled. > > brian > > > On Wed, Dec 15, 2010 at 1:06 AM, Yaw Anokwa wrote: >> hey allen, >> >> sounds like you've gotten pretty far. i don't know the commcarehq api >> for submitting data but maybe the folks from dimagi on this list can >> help. >> >> yaw >> >> On Tue, Dec 14, 2010 at 07:55, Allen Machary wrote: >>> Hi >>> I have installed ODKCollect on Android Emulator, set-up ODKAggregates on >>> Google app engine. >>> then created some custom forms which i uploaded into my ODKAggregates then i >>> easly pull the forms to my ODKCollect. >>> sending data to Aggregates works perfectly. >>> But i would like to redirect data submission from ODK Collect to commcareHQ >>> i have already set-up commcareHQ in my local machine >>> could you please direct me on give me hints on how to go about this. >>> thanx >>> -- >>> Allen Machary. >>> >>> >> >

note that the server preferences in collect are http://url/submission.
we should change it to make an actual url, but until we do, the
relevant code is at

http://code.google.com/p/opendatakit/source/browse/src/org/odk/collect/android/activities/InstanceUploaderActivity.java?repo=collect&r=c5ed67b7006125b6eb200f6383a17ce4c0684ba9#73

··· On Wed, Dec 15, 2010 at 15:56, Brian DeRenzi wrote: > just chatted with Carl. I think the trailing '/' issue we had was > because we were running a local version of aggregate without a real > web server. doesn't seem like this is really an issue. (i'd still omit > it though...) > > brian > > > On Wed, Dec 15, 2010 at 7:03 AM, Brian DeRenzi wrote: >> hi allen, >> >> you'll need to change the URL that collect posts to. from the main >> screen in collect, press the menu softkey, choose "server preferences" >> (only option) and modify the "Server" entry. for CCHQ, the url you >> want is something like: >> >> http://myCCHQServerOrIPAddress.com/receiver/submit/domainname >> >> where you fill in the "myCCHQServerOrIPAddress.com" and "domainname" >> with your particular details. make sure you don't have a trailing '/', >> as there is an outstanding bug in collect where that is not handled. >> >> brian >> >> >> On Wed, Dec 15, 2010 at 1:06 AM, Yaw Anokwa wrote: >>> hey allen, >>> >>> sounds like you've gotten pretty far. i don't know the commcarehq api >>> for submitting data but maybe the folks from dimagi on this list can >>> help. >>> >>> yaw >>> >>> On Tue, Dec 14, 2010 at 07:55, Allen Machary wrote: >>>> Hi >>>> I have installed ODKCollect on Android Emulator, set-up ODKAggregates on >>>> Google app engine. >>>> then created some custom forms which i uploaded into my ODKAggregates then i >>>> easly pull the forms to my ODKCollect. >>>> sending data to Aggregates works perfectly. >>>> But i would like to redirect data submission from ODK Collect to commcareHQ >>>> i have already set-up commcareHQ in my local machine >>>> could you please direct me on give me hints on how to go about this. >>>> thanx >>>> -- >>>> Allen Machary. >>>> >>>> >>> >> >

Just to clarify a bit.

The URL entered in the server preferences is used by many parts of
collect to make multiple calls to the server (e.g, get xforms, upload
submissions, etc) by appending the proper address to the end of the
URL entered by the user (essentially a base URL). The goal is to have
a joint OpenRosa API so that all servers act the same (this is easier
said than done as negotiations have been going on for about a year).

Besides these issues that need to be sorted out, ODK Collect should do
a much better job of cleaning up the inputted URL of the user in
server settings. Basically it should add the http for the user if they
forgot, make sure there is one and only one '/' at the end of the URL
letting the user either enter a '/' or not and see no difference.

The first standardized change is hard and is a work in progress, the
second change is easier and is on the TODO list.

··· On Thu, Dec 16, 2010 at 2:15 AM, Yaw Anokwa wrote: > note that the server preferences in collect are http://url/submission. > we should change it to make an actual url, but until we do, the > relevant code is at > > http://code.google.com/p/opendatakit/source/browse/src/org/odk/collect/android/activities/InstanceUploaderActivity.java?repo=collect&r=c5ed67b7006125b6eb200f6383a17ce4c0684ba9#73 > > On Wed, Dec 15, 2010 at 15:56, Brian DeRenzi wrote: >> just chatted with Carl. I think the trailing '/' issue we had was >> because we were running a local version of aggregate without a real >> web server. doesn't seem like this is really an issue. (i'd still omit >> it though...) >> >> brian >> >> >> On Wed, Dec 15, 2010 at 7:03 AM, Brian DeRenzi wrote: >>> hi allen, >>> >>> you'll need to change the URL that collect posts to. from the main >>> screen in collect, press the menu softkey, choose "server preferences" >>> (only option) and modify the "Server" entry. for CCHQ, the url you >>> want is something like: >>> >>> http://myCCHQServerOrIPAddress.com/receiver/submit/domainname >>> >>> where you fill in the "myCCHQServerOrIPAddress.com" and "domainname" >>> with your particular details. make sure you don't have a trailing '/', >>> as there is an outstanding bug in collect where that is not handled. >>> >>> brian >>> >>> >>> On Wed, Dec 15, 2010 at 1:06 AM, Yaw Anokwa wrote: >>>> hey allen, >>>> >>>> sounds like you've gotten pretty far. i don't know the commcarehq api >>>> for submitting data but maybe the folks from dimagi on this list can >>>> help. >>>> >>>> yaw >>>> >>>> On Tue, Dec 14, 2010 at 07:55, Allen Machary wrote: >>>>> Hi >>>>> I have installed ODKCollect on Android Emulator, set-up ODKAggregates on >>>>> Google app engine. >>>>> then created some custom forms which i uploaded into my ODKAggregates then i >>>>> easly pull the forms to my ODKCollect. >>>>> sending data to Aggregates works perfectly. >>>>> But i would like to redirect data submission from ODK Collect to commcareHQ >>>>> i have already set-up commcareHQ in my local machine >>>>> could you please direct me on give me hints on how to go about this. >>>>> thanx >>>>> -- >>>>> Allen Machary. >>>>> >>>>> >>>> >>> >> >