HUNTERSVILLE, N.C.—Toward the end of Janisse Flowers’s pregnancy, a nurse at her gynecologist’s office asked her to download an iPhone app that would track how often she text messaged with friends, how long she talked on the phone and how far she traveled each day.

The app was part of an effort by Ms. Flowers’s health-care provider to test whether smartphone data could help detect symptoms of postpartum depression, an underdiagnosed condition affecting women after they give birth. The app’s developer, San Francisco-based Ginger.io...