A smart-phone app in development for depression patients tracks contacts and movement, and prompts activities when patterns show withdrawal. Katherine Harmon reports