Researchers at Cambridge University have developed an app that tries to track happiness by combining smartphone data with users' perception of mood.
EmotionSense collects information about where users are, how noisy the environment is and whom they are communicating with.
It then combines this data with the user's own report about mood.
The app is part of a project to see how mobile phones can be used to improve health and wellbeing.
Mood-tracking apps already exist but the team from the Cambridge Computer Laboratory think this is the first time that user-input data and phone information sources have been combined.
"Most other attempts at software like this are coarse-grained in terms of their view of what a feeling is," said Dr Jason Rentfrow, a senior lecturer in the department of psychology at Cambridge University.
"Many just look at emotions in terms of feeling happy, sad, angry or neutral. The aim here is to use a more flexible approach, to collect data that shows how moods vary between people. That is something which we think is quite unique to the system we have designed," he said.
When the app is opened for the first time, a sensor that tells the researchers what time of day it is is unlocked. The app spends roughly a week collecting data from this sensor and testing it against the user's emotional state.
'Journey of discovery'
At the end of this, the user is asked to complete a short life satisfaction survey, which unlocks a new sensor.
It takes about eight weeks to unlock all the sensors, which include gauging how sociable someone is dependent on how many texts they send or calls they make, their movements, location and how much they are interacting with their mobile phones.
It has been designed as "a journey of discovery" for the user to give them a step-by-step guide to what might be influencing their mood swings, said lead researcher Dr Neal Lathia.
"This helps us understand both how a person perceives things and how they are actually behaving," he said.
"They may say that they are feeling happy but they may have stopped communicating with friends, for example. This is all about building a bridge between the two sources of data."
The system that allows users to input their own data about how they are feeling has been designed by psychologists.
At different times of the day, the app sends the users a notification asking them about their mood. Users are asked to input their mood on an "emotion grid" that has two axes. The first charts negative to positive feelings while another charts activity.
It is hoped the app can be used by doctors as a therapeutic tool as well as by individuals to work out the times that they are most stressed, for example.
"Most people who see a therapist only have an appointment once every fortnight," said Dr Lathia.
"Many, however, keep their phones with them most of the time. In terms of sheer presence, mobiles can provide an ongoing link with a person," he said.
The code used to collect sensor data is being made publicly available to allow other researchers to conduct their own experiments.
Initially the app will be available only for Android phones but the team is working on a version for other smartphones.
Users must explicitly consent to their data being used by members of the team, although it will not be made available more widely.