SAN FRANCISCO – Google Inc. unveiled payment services, security upgrades and access to HBO movies and shows for its popular Android software, seeking to push back against growing competition from rivals such as Apple.

The new version of the mobile software, called Android M, will include Android Pay, which enables transactions at more than 700,000 stores in the United States, Dave Burke, vice president of engineering for Android, said at the Internet company's annual developers' conference in San Francisco on Thursday.

Google is investing to extend Android's reach by keeping users engaged on its services and attracting them to new platforms using the software, such as televisions, autos and wearable devices. The Web search company's mobile operating system grabbed 79 percent of the global smartphone market in the first quarter, down from 81 percent a year earlier, as Apple's iPhone gained ground, according to Gartner Inc.

"For M, we have gone back to the basics," said Sundar Pichai, Google's senior vice president of products. "We have really focused on polish and quality."

The conference, called I/O, comes less than two weeks before the start of Apple's developer event. The companies are vying to attract software makers with more media platforms, better tools and new opportunities to make money from applications. Innovative mobile apps, such as messaging features, puzzle games and news services, can help keep users on the companies' platforms.

Android users will get faster battery charging, more fingerprint-related features and greater control over the information accessed by their devices. Users will be able to designate which Android apps can access personal data such as location, contacts and a device's camera, Google said.

HBO Now, the stand-alone Web-streaming service for movies and TV shows such as "Game of Thrones," will be available across all of Google's devices, including televisions and mobile gadgets. The expansion gives HBO Now better access to consumers with Android devices, while bringing Google parity with Apple TV, which began offering HBO Now in April.

Google also showed off a feature of its mobile software that will bring the personalized notifications of its Now service to any application on Android. With the new Now on Tap service, users can query Google directly within an app, such as searching for more information on a musical artist while a song is playing.

Following on last year's introduction of a cardboard-based device to turn Android phones into virtual-reality headsets, the company Thursday showed how its Cardboard effort can be deployed in classrooms, giving teachers an affordable way to use VR as a tool. Using Cardboard, students can be taken into a detailed virtual underwater environment, the Great Wall of China or 17th-century Verona, Italy.

Google also is seeking to make it easier to record and watch virtual-reality videos through a project called Jump, and said it's working with GoPro Inc. on a camera to create footage for the Jump platform that will be shown on YouTube. More than 1 million Cardboard viewers have been shipped.

The company's announcements also included a new Google Photos app, which offers unlimited free storage of photos and videos, accessible from any device. The app will let users edit and organize pictures and videos and share them on social media or with smaller groups, Google said.