  JITAI is an emerging technique with great potential to support health
behavior by providing the right type and amount of support at the right time. A
crucial aspect of JITAIs is properly timing the delivery of interventions, to
ensure that a user is receptive and ready to process and use the support
provided. Some prior works have explored the association of context and some
user-specific traits on receptivity, and have built post-study machine-learning
models to detect receptivity. For effective intervention delivery, however, a
JITAI system needs to make in-the-moment decisions about a user's receptivity.
To this end, we conducted a study in which we deployed machine-learning models
to detect receptivity in the natural environment, i.e., in free-living
conditions.
  We leveraged prior work regarding receptivity to JITAIs and deployed a
chatbot-based digital coach~-- Ally~-- that provided physical-activity
interventions and motivated participants to achieve their step goals. We
extended the original Ally~app to include two types of machine-learning model
that used contextual information about a person to predict when a person is
receptive: a \textit{static model\/} that was built before the study started
and remained constant for all participants and an \textit{adaptive model\/}
that continuously learned the receptivity of individual participants and
updated itself as the study progressed. For comparison, we included a
\textit{control model\/} that sent intervention messages at random times. The
app randomly selected a delivery model for each intervention message. We
observed that the machine-learning models led up to a 40\% improvement in
receptivity as compared to the control model. Further, we evaluated the
temporal dynamics of the different models and observed that receptivity to
messages from the adaptive model increased over the course of the study.
