Google has unveiled its new Pixel 2 and Pixel 2 XL smartphones, with the Android-maker bullish that it can directly challenge the dominance of Apple’s iPhone.

The firm is using the new high-end smartphones and Android Oreo operating system to demonstrate its prowess in combining hardware and software, using exclusive features to attempt things other manufacturers including Apple cannot.

The two phones both have the latest Qualcomm Snapdragon 835 processor, 64GB of storage as standard, front-facing speakers, water-resistance to IP67 standards, and new 12-megapixel cameras on the back, but with different sized OLED screens – and, following the iPhone’s lead, no headphone socket. The Pixel 2 has a traditional 5in screen with large bezels at the top and bottom and costs from £629, while the Pixel 2 XL has a modern design similar to the Samsung Galaxy S8 and LG’s G6, with an elongated 6in screen and small bezels, costing from £799.

In a direct swipe at Apple, Google’s vice president product manager Mario Queiroz said: “We don’t save cool features just for the large device. You get all the goodness with both phones, so the only choice you have to make is what size you want.”

Facebook Twitter Pinterest The smaller 5in Google Pixel 2 in a light blue colour. Photograph: Google

The Pixel 2 and 2 XL also have pressure-sensitive sides that can be squeezed to launch the company’s Google Assistant. A similar feature debuted in HTC’s U11 smartphone, but Google appears to be using it as a way to get around the stigma of using the voice assistant’s wake phrase “OK, Google” in public, launching the Assistant without having to power on the device and hold the home button.

Google says the phones also have 10% longer battery life and faster charging than the 2016 Pixel smartphones. “We’ve focused on super-fast charging, so you can get around seven hours of use out of a 15-minute charge. And we supply the fast charger in the box,” said Christiaan Prins, product manager at Google – another jab at Apple, which does not include a fast charger in the box with the iPhone 8 or 8 Plus.

To take the iPhone on, Google has focused on fine-tuning the combination of hardware and software, from intelligent features to super-smooth operation. The camera is the most obvious element.

The Pixel 2 has what Google is calling “the best smartphone camera, again”, employing an improved version of the firm’s HDR+ computational photography technique to create photos from several rapidly captured images, producing better results than simple shots. It will also have optical image stabilisation for both still images and – combined with electronic image stabilisation for so-called fused stabilisation – for video as well, something most other smartphones are incapable of doing. But the big new thing for the Pixel 2 is new depth-sensing system for a single camera using the common dual-pixel autofocus system.

Brian Rakowski, vice president product manager at Google said: “Because of the dual pixel sensor system and HDR+, even though they’re only microns apart, we’re able to get multiple right and left images from one camera with each shot, so when combined with a whole bunch of crazy maths we can get a depth map of the scene.”

“We can do it with one camera, which means we can do it on the main rear camera, but we can also do it on the selfie camera too, on both phones. Most phones need two cameras to do that, but we can do it with one and do it really well,” Queiroz added.

The depth information is used to create a portrait mode, which identifies what’s in the foreground to artificially blur the background simulating the look of a high-end digital SLR camera – a feature that has proved popular for dual-camera phones such as Apple’s iPhone 8 Plus.

Facebook Twitter Pinterest The 5in Google Pixel 2 in white. Photograph: Google

Google is also using the depth information for augmented-reality experiences, similar to that offered by Apple, calibrating each camera at the factory before shipping it for greater accuracy. There is also a new smart-camera feature called Lens, intended as a demonstration of what Google’s AI can do when integrated into a camera, detecting landmarks and book covers.

Rakowski said: “People on Pixel take twice as many pictures as iPhone users, and they’re storing around 23GB of images a year. If you were using Apple’s iCloud after a few months at that rate you’d be into the paid tier, but with Google Photos on the Pixel you’ve got unlimited full-resolution backup.”

In a marked change for Google, the company is also baking more of its advanced artificial-intelligence systems directly into the smartphone, rather than relying on the cloud to provide the smart aspects. One new feature driven by that move is the option to have the smartphone listen out for music and identify the song currently playing in your environment.

Rakowski said: “The way Now Playing works is that we have an amazing on-device machine learning model and a database of 100,000 songs updated weekly customised to location that will match the song playing in the background and put a little notification telling you what song and artist is playing on the always-on screen.”

The “ambient” feature, designed to pick up what’s playing in a coffee shop or gym without the user having to activate anything like similar apps such as Shazam, works even in airplane mode, and doesn’t share the information with Google or contact a server unless the user taps on the notification to find out more or add it to a Google Play Music or Spotify playlist.

Queiroz said: “We will do more and more on device, but the capabilities in the cloud will also keep improving, so in the future it’ll be a combination of those two that we think will deliver the optimum experience. Sometimes we’re going to want to do things on the device because it’s very fast, and for privacy reasons, and some things will be done in the cloud for the best experience.”

The Pixel 2 and Pixel 2 XL will both be available exclusively in the UK through EE, Carphone Warehouse or direct from Google, available for pre-order immediately. The Pixel 2 costs £629 for 64GB of storage or £729 for 128GB of storage and the Pixel 2 XL costs £799 for 64GB of storage or £899 for 128GB of storage. The Pixel 2 will ship on 19 October, the Pixel 2 XL on 15 November.

Ben Wood, chief of research at CCS Insight said: “Google has a mountain to climb if it wants to displace Apple’s iPhone, and even challenging Samsung, which has a trio of superb Android-powered flagship devices, will be tough; iPhone users are extremely unlikely to defect from their Apple device to an Android product and if they do the most likely device they will consider will come from Samsung.

“At the same time, going head-to-head with other Android phone makers won’t go down well. History has shown that companies that compete with their own channels invariably become unstuck. With the Android platform being so strategic to the broader Google business this is a dangerous game to play.”

Alongside the Pixel 2 smartphones, Google also launched a new smaller version of its Google Home speaker with Google Assistant, which now has a male voice option, called the Google Home Mini, which is a direct competitor to Amazon’s Echo Dot. A new premium audio version called the Google Home Max was also unveiled as a direct competitor to the new improved Amazon Echo and Apple’s upcoming HomePod speaker.

At the San Francisco launch, the company also took the wraps off a new premium, convertible Chromebook called the Pixelbook, which replaces the £1,000 Chromebook Pixel from 2015, a new version of the DayDream View VR headset, some Pixel Buds Bluetooth earbuds that can do translation in 40 languages and a wearable camera called Google Clips.