President Barack Obama didn't mention Donald Trump by name on Thursday during a talk in San Francisco, but he clearly referenced his successor when he suggested that two things a president should avoid doing are watching TV and social media.

Even without invoking Trump's name, he was taking on the agenda of the current president in discussing the urgency of addressing climate change. Speaking at an event hosted by software company Splunk, Obama hit on a number of areas where technology advancements can benefit society, including health care and even traffic congestion.

But, following up on a key issue from his eight-year presidency, Obama said there's no bigger challenge facing us than climate change. While technology can solve certain issues related to the changing environment, ultimately "it's a moral decision that we make," he said.

"There are a handful of issues that if we don't get right we have real problems," Obama said. "Climate change is a big problem."

His keynote comes a day after President Trump held his first fundraiser in the Bay Area since becoming president in 2017. The $1,000 to $50,000-per-plate event on Tuesday was at the home of Sun Microsystems co-founder Scott McNealy, and attracted protesters with a giant inflatable baby Trump.

One of Trump's key efforts is rolling back Obama-era regulations, most notably those related to environmental rules. The president said on Wednesday that his administration is barring California from setting its own auto emissions standards, setting up the latest struggle over the administration's push to unravel restrictions on businesses. California has been insulated from many of Trump's efforts because the state insisted on setting its own strict standards under a federal waiver issued in 2013.