University of Wisconsin Madison researchers have designed a smartphone app that aims to prevent alcoholics and drug addicts from relapsing.