Notifications and Intervals

I'm new to ODK and am hoping to modify Collect for a study at UC Irvine.
I've been looking at the source, but in the meantime I was wondering if
anyone could point me in the right direction. Here is what we need the app
to do:

  1. Notify the user that there is a form that they need to fill out, and
    take the user to that form
  2. Perform these notifications at specified times
  3. (Ideally) retrieve these times from the xform itself

What I've done already:
I've set up a notification service. I'm not sure if I'm going about this
the right way, but I'm wondering if there are functions that 1) return a
list of the blank forms that have been downloaded and 2) given the ID of a
form, return the form data. Any direction or help would be much appreciated!

Thanks!

Melissa,

Take a look at Collect's ContentProvider -- they should have the data
that you are looking for. Mitch's post at
https://groups.google.com/d/msg/opendatakit-developers/6sJPIvZK3AA/01_gYr0X6pwJ
will help.

Depends on what your usecase is, but it might be easier to use an
standalone alarm clock app (say the open source one from CyanogenMod)
to alert the user or launch the specific form (using intents and ODK's
form shortcuts) at the particular time (with different sounds and
snooze!). The downside here is that you have set this up on the device
first, but I you could write a pretty lightweight server that
configures the alarm app if you so desire.

As far as retrieving the times from the XForm, you can add startTime,
endTime to the form (see bottom of
http://opendatakit.org/help/form-design/examples for Preloaded Fields)
and that will let you know when the form was first opened and last
saved.

Also depends on how your study is structured, but you may have to
configure Collect to prevent users from filling out forms outside that
time or re-editing forms. And you may have to lock down the alarm app
to prevent users from tampering (search for app lock/protector on the
Google Play Store for apps that do that).

Hope that helps, and if you have more development questions, send it
to opendatakit-developers@googlegroups.com.

Yaw

··· On Thu, Jan 31, 2013 at 9:20 AM, Melissa Niiya wrote: > I'm new to ODK and am hoping to modify Collect for a study at UC Irvine. > I've been looking at the source, but in the meantime I was wondering if > anyone could point me in the right direction. Here is what we need the app > to do: > > 1. Notify the user that there is a form that they need to fill out, and take > the user to that form > 2. Perform these notifications at specified times > 3. (Ideally) retrieve these times from the xform itself > > What I've done already: > I've set up a notification service. I'm not sure if I'm going about this the > right way, but I'm wondering if there are functions that 1) return a list of > the blank forms that have been downloaded and 2) given the ID of a form, > return the form data. Any direction or help would be much appreciated! > > Thanks! > > -- > -- > Post: opendatakit@googlegroups.com > Unsubscribe: opendatakit+unsubscribe@googlegroups.com > Options: http://groups.google.com/group/opendatakit?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "ODK Community" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to opendatakit+unsubscribe@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > >

Ah, now I see the ODK Developers group - sorry for posting in the wrong
group!

Thank you so much for your suggestions! I think the standalone alarm app
might suit our needs.

··· On Thursday, January 31, 2013 10:10:36 AM UTC-8, Yaw Anokwa wrote: > > Melissa, > > Take a look at Collect's ContentProvider -- they should have the data > that you are looking for. Mitch's post at > > https://groups.google.com/d/msg/opendatakit-developers/6sJPIvZK3AA/01_gYr0X6pwJ > will help. > > Depends on what your usecase is, but it might be easier to use an > standalone alarm clock app (say the open source one from CyanogenMod) > to alert the user or launch the specific form (using intents and ODK's > form shortcuts) at the particular time (with different sounds and > snooze!). The downside here is that you have set this up on the device > first, but I you could write a pretty lightweight server that > configures the alarm app if you so desire. > > As far as retrieving the times from the XForm, you can add startTime, > endTime to the form (see bottom of > http://opendatakit.org/help/form-design/examples for Preloaded Fields) > and that will let you know when the form was first opened and last > saved. > > Also depends on how your study is structured, but you may have to > configure Collect to prevent users from filling out forms outside that > time or re-editing forms. And you may have to lock down the alarm app > to prevent users from tampering (search for app lock/protector on the > Google Play Store for apps that do that). > > Hope that helps, and if you have more development questions, send it > to opendatakit...@googlegroups.com . > > Yaw > > On Thu, Jan 31, 2013 at 9:20 AM, Melissa Niiya <m.k....@gmail.com> wrote: > > I'm new to ODK and am hoping to modify Collect for a study at UC Irvine. > > I've been looking at the source, but in the meantime I was wondering if > > anyone could point me in the right direction. Here is what we need the > app > > to do: > > > > 1. Notify the user that there is a form that they need to fill out, and > take > > the user to that form > > 2. Perform these notifications at specified times > > 3. (Ideally) retrieve these times from the xform itself > > > > What I've done already: > > I've set up a notification service. I'm not sure if I'm going about this > the > > right way, but I'm wondering if there are functions that 1) return a > list of > > the blank forms that have been downloaded and 2) given the ID of a form, > > return the form data. Any direction or help would be much appreciated! > > > > Thanks! > > > > -- > > -- > > Post: opend...@googlegroups.com > > Unsubscribe: opendatakit...@googlegroups.com > > Options: http://groups.google.com/group/opendatakit?hl=en > > > > --- > > You received this message because you are subscribed to the Google > Groups > > "ODK Community" group. > > To unsubscribe from this group and stop receiving emails from it, send > an > > email to opendatakit...@googlegroups.com . > > For more options, visit https://groups.google.com/groups/opt_out. > > > > >