Prime Minister Justin Trudeau says he had more to say to Chinese President Xi Jinping than just a perfunctory hello. 

Trudeau says he made the point to Xi that it's important their two countries keep their lines of communication open. 

He says it's essential that Canada and China keep working toward creating what Trudeau calls constructive dialogue. 

The two leaders shared a brief encounter Thursday when they stood elbow-to-elbow for the family photo at the APEC summit in San Francisco. 

Xi and U.S. President Joe Biden have been the talk of the summit all week after their closely watched four-hour meeting Wednesday. 

Trudeau calls that meeting an important and positive development not only for U.S.-China relations, but for the broader world at large. 

Canada and China "need to keep our officials and teams working together to try and create constructive dialogue around issues that matter to us individually, but also matter to the world," Trudeau said.

"This is part of the ongoing engagement that Canada needs to have around the world, including with countries we disagree with." 

Biden and Xi agreed to resume communications between their respective militaries, a channel that went largely dormant after former House Speaker Nancy Pelosi visited Taiwan in 2022. 

As a result, the Pentagon was unable to liaise with its Chinese counterparts earlier this year when a spy balloon drifted through North American airspace. 

Trudeau acknowledged that Canada's relations with China haven't exactly been warm recently either. 

Beijing detained Canadian citizens Michael Spavor and Michael Kovrig for nearly three years, a move widely seen as retribution for Canada's detention of Huawei executive Meng Wanzhou over the same period. 

China meanwhile imposed multi-year bans on Canadian imports of meat and canola, claiming concerns about unspecified pests. 

And a year after the Canadian government named China as a disruptive global force and declared Beijing as responsible for attempts at foreign interference, the Chinese government left Canada out as it loosened restrictions on group travel.

"We have always been very, very clear, going back years now, with our concerns around foreign interference, and we're going to continue to do everything necessary to keep Canadians safe," Trudeau said.

"At the same time, we have to look for constructive ways to engage in the global economy, and China remains an important player."

In September, Ottawa appointed a judge to lead a public inquiry into foreign interference in federal electoral processes and democratic institutions, with a mandate that singles out "China, Russia and other foreign states or nonstate actors."

Earlier this year, Conservative MP Michael Chong testified before a congressional committee about his experiences as a target of Chinese coercion and misinformation campaigns. 

This report by The Canadian Press was first published Nov. 17, 2023.