Barack Obama has taken a rare, thinly veiled poke at his predecessor, suggesting it was unwise for any president to spend too much time watching television or reading social media.

While not referring to Donald Trump by name, Mr Obama told an audience in San Francisco, it was very difficult to perfect a decision-making process in the White House.

“Make sure you have a team with a diversity of opinion sitting around you,” he said, according to CNBC. “The other thing that’s helpful is not watching TV or reading social media. Those are two things I would advise, if you’re our president, not to do.

He added: “It creates a lot of noise and clouds your judgment.”

While Mr Obama was the first sitting president to make use of social media, he did so sparingly. By contrast, Mr Trump, who has 64.5m Twitter followers, uses it as a way to communicate directly with his supporters.

9 of Barack Obama's best feminist quotes Show all 9 1 /9 9 of Barack Obama's best feminist quotes 9 of Barack Obama's best feminist quotes On shifting sexist attitudes 'We need to keep changing the attitude that raises our girls to be demure and our boys to be assertive, that criticises our daughters for speaking out and our sons for shedding a tear. We need to keep changing the attitude that punishes women for their sexuality and rewards men for theirs.' (Glamour magazine, August 2016) Getty Images 9 of Barack Obama's best feminist quotes On fair workplace policies 'Today, women make up about half our workforce. But they still make 77 cents for every dollar a man earns. That is wrong, and in 2014, it’s an embarrassment. A woman deserves equal pay for equal work. She deserves to have a baby without sacrificing her job. A mother deserves a day off to care for a sick child or sick parent without running into hardship – and you know what, a father does, too. It’s time to do away with workplace policies that belong in a Mad Men episode.' (State of the Union speech, January 2014) Getty Images 9 of Barack Obama's best feminist quotes On the importance of feminist role models 'Michelle and I have raised our daughters to speak up when they see a double standard or feel unfairly judged based on their gender or race – or when they notice that happening to someone else. It’s important for them to see role models out in the world who climb to the highest levels of whatever field they choose. And yes, it’s important that their dad is a feminist, because now that’s what they expect of all men.' (Glamour magazine, August 2016) Getty Images 9 of Barack Obama's best feminist quotes On breaking glass ceilings 'As we prepare to write the next chapter of women's history, let us resolve to build on the progress won by the trailblazers of the past. We must carry forward the work of the women who came before us and ensure our daughters have no limits on their dreams, no obstacles to their achievements, and no remaining ceilings to shatter.' (Presidential Proclamation for Women's History Month, February 2011) Getty Images 9 of Barack Obama's best feminist quotes On granting women equal opportunities 'Around the world there is a tradition of oppressing women and treating them differently and not giving them the same opportunities, and husbands beating their wives, and children not being sent to school. Those are traditions. Treating women and girls as second-class citizens. Those are bad traditions. They need to change.' (During speech in Nairobi, Kenya in July 2015) Getty Images 9 of Barack Obama's best feminist quotes On gender stereotypes 'We know that these stereotypes affect how girls see themselves starting at a very young age, making them feel that if they don’t look or act a certain way, they are somehow less worthy. In fact, gender stereotypes affect all of us, regardless of our gender, gender identity, or sexual orientation.' (Glamour magazine, August 2016) Getty Images 9 of Barack Obama's best feminist quotes On gender pay inequality 'It is now our generation’s task to carry on what those pioneers began. For our journey is not complete until our wives, our mothers and daughters can earn a living equal to their efforts.' (Inaugural Address, January 2013) Getty Images 9 of Barack Obama's best feminist quotes On the true meaning of masculinity 'It’s easy to absorb all kinds of messages from society about masculinity and come to believe that there’s a right way and a wrong way to be a man. But as I got older, I realised that my ideas about being a tough guy or cool guy just weren’t me. They were a manifestation of my youth and insecurity. Life became a lot easier when I simply started being myself.' (Glamour magazine, August 2016) Getty Images 9 of Barack Obama's best feminist quotes On what a feminist looks like 'I did want to stop by and make one thing very clear: I may be a little greyer than I was eight years ago – but this is what a feminist looks like. Of course, in my household there’s no choice.' (United States of Women Summit, June 2016) AFP/Getty Images

He also frequently tweets things that are deeply controversial, and has used the platform to fire several members of his administration. The president is also known to be an avid watcher of television, in particular Fox News.

Mr Obama, who was speaking at a conference organised by the software and technology company Splunk, said it was important for presidents to surround themselves not simply by people who shared the same view of them, something Mr Trump is known to do. He recently fired national security advisor John Bolton, as the two fell out over how to deal with issues such as Iran, North Korea and Afghanistan.

Barack Obama wears tan suit by tailor Georges de Paris at White House briefing in 2014

“Then what you have to do is create a process where you have confidence that whatever data is out there has been sifted and sorted,” he said, as Mr Trump was also in California, on a fundraising trip.

”What it does mean is that if you are susceptible to worrying about what are the polls saying or what might this person say about this topic or you start mistaking the intensity of the passion of a very small subset of people with a broader sense about your country or people who know something about the topic, that will sway your decision-making in an unhealthy way.”

On the issue of climate change, Mr Obama said it was the largest priority for the world.