Have you ever wondered how your smartwatch knows exactly when to remind you to stand up or how a fitness app can predict your next workout...