Facebook is building its own operating-system software to decrease its future dependence on rivals like Apple and Google, owners of the world’s most popular mobile operating systems.

The planned operating system, earlier reported by The Information, would be focused more on future products, such as augmented-reality glasses, according to a Facebook spokeswoman. Facebook has shared plans to build this type of glasses, with software built in, but the social-media giant is likely years away from launching anything in this area.

“We really want to make sure the next generation has space for us,” Andrew Bosworth, Facebook’s head of hardware, told The Information regarding the company’s plan to build a new operating system. “We don’t think we can trust the marketplace or competitors to ensure that’s the case. And so we’re gonna do it ourselves.”

Facebook has sought ways to alleviate its dependence on Apple and Google for years. It previously tried to build its own mobile phone and developed a software layer to work on HTC handsets, though both projects failed. Facebook also previously had a contingency plan in place, called Project Oxygen, in case its apps were ever blocked or inaccessible from the Google Play Store and Facebook had to ensure users could get them somewhere else.

Some technology industry leaders, including Facebook Chief Executive Officer Mark Zuckerberg, believe that AR glasses could one day take the place of mobile phones as consumers’ primary way of connecting to the internet. If that turns out to be the case, Menlo Park, California-based Facebook wants to have more control over the software that operates on those devices.