HT TECH wants to start sending you push notifications. Click allow to subscribe

Google announces new API for apps to easily track your sleep patterns

Tracking sleep on Android devices in the past was extremely difficult, thanks to background battery drain and unreliable sensor information that varied between devices and apps.

By: HT TECH
Updated on: Aug 21 2022, 15:16 IST
Google's new API will let apps track your sleep better (Pixabay)

Tracking your sleep can provide useful insights for people who want to monitor sleeping and waking patterns or simply measure the quality and amount of rest they’re getting every night. However, while tracking sleep via a wearable fitness tracker is quite easy, those doing so via their Android phones have a much tougher time because of unreliable performance and massive battery drain.

Google is now offering app developers a solution, in the form of its new Sleep API which it announced on its developer blog for the operating system. The company says it is an Activity Recognition API that will surface information about a users sleep - this can be integrated into all sorts of applications from alarm clocks to sleep tracking apps.

You may be interested in

Mobiles Tablets Laptops
23% OFF
Samsung Galaxy S23 Ultra 5G
  • Green
  • 12 GB RAM
  • 256 GB Storage
₹115,999₹149,999
Buy now
24% OFF
Google Pixel 128GB
  • Black
  • 4 GB RAM
  • 128 GB Storage
₹64,990₹84,999
Buy now
36% OFF
Google Pixel 2 128GB
  • Kinda Blue
  • 4 GB RAM
  • 128 GB Storage
₹63,990₹99,999
Buy now
Samsung Galaxy S23 5G
  • Green
  • 8 GB RAM
  • 128 GB Storage
₹57,999
Check details
21% OFF
Acer Swift Go SFG14 41 NX KG3SI 002 Laptop
  • Pure Silver
  • 8 GB RAM
  • 512 GB SSD
₹58,990₹74,999
Buy now
39% OFF
Acer Aspire 5 A515 57G Laptop
  • Gray
  • 16 GB RAM
  • 512 GB SSD
₹54,949₹89,999
Buy now
22% OFF
Acer Aspire 3 A315 24 NX KDESI 004 Laptop
  • Silver
  • 8 GB RAM
  • 512 GB SSD
₹33,499₹42,999
Buy now
39% OFF
Asus VivoBook 15 X515JA BQ322WS Laptop
  • Transparent Silver
  • 8 GB RAM
  • 512 GB SSD
₹31,490₹51,990
Buy now
34% OFF
Xiaomi Pad 6
  • Mist Blue
  • 6 GB RAM
  • 128 GB Storage
₹26,299₹39,999
Buy now
55% OFF
Lenovo Tab M10 5G
  • Abyss Blue
  • 6 GB RAM
  • 128 GB Storage
₹20,999₹47,000
Buy now
32% OFF
Realme Pad 2
  • Imagination Grey
  • 6 GB RAM
  • 128 GB Storage
₹19,790₹28,999
Buy now
Honor Pad X9
  • Gray
  • 4 GB RAM
  • 128 GB Storage
₹14,999
Check details

Read more: Google says it is fixing the ‘Ok Google’ hotword for Wear OS users, months after it got reported

The company says that while existing solutions from developers involve using a combination of device sensors and other inputs to check if a user is asleep and awake, these are usually not consistent between apps and if a user has multiple apps installed, it could wreak havoc on your battery if they’re running all night.

“The Sleep API is a simple API that centralizes sleep detection processing in a battery-efficient manner. For this launch, we are proud to collaborate with Urbandroid, the developer of the popular alarm app, Sleep As Android,” said Nick Grayson, Product Manager at Google. Sleep As Android is one of the oldest and well-known sleep tracking apps available on the Play Store.

Read more: Netflix testing sleep timer button on Android

Google is bundling the new Sleep API as part of the latest version of Google Play Services (February 18) and developers can make use of it right away - after they take a look at Googles Sleep API documentation. “This API is one step of our efforts to help our users get a better night's rest. We look forward to working more on this API and in this area in the future,” the company said.

Catch all the Latest Tech News, Mobile News, Laptop News, Gaming news, Wearables News , How To News, also keep up with us on ,Twitter, Facebook, , and Instagram. For our latest videos, subscribe to our YouTube channel.

First Published Date: 26 Feb, 14:27 IST

Sale

Mobiles Tablets Laptops
7% OFF
Apple iPhone 15 Pro Max
  • Black Titanium
  • 8 GB RAM
  • 256 GB Storage
₹148,900₹159,900
Buy now
13% OFF
Xiaomi 14
  • Matte Black
  • 12 GB RAM
  • 512 GB Storage
₹69,999₹79,999
Buy now
11% OFF
Apple iPhone 15 Plus
  • Black
  • 6 GB RAM
  • 128 GB Storage
₹79,800₹89,900
Buy now
3% OFF
Samsung Galaxy Z Fold5
  • Icy Blue
  • 12 GB RAM
  • 256 GB Storage
₹154,999₹159,999
Buy now
57% OFF
Lenovo Tab M10 5G
  • Abyss Blue
  • 6 GB RAM
  • 128 GB Storage
₹19,999₹47,000
Buy now
38% OFF
Realme Pad 2
  • Imagination Grey
  • 6 GB RAM
  • 128 GB Storage
₹17,999₹28,999
Buy now
20% OFF
Samsung Galaxy Tab S9 5G 256GB
  • Graphite
  • 8 GB RAM
  • 256 GB Storage
₹88,400₹110,998
Buy now
6% OFF
Apple iPad Pro 11 2022
  • Silver
  • 8 GB RAM
  • 128 GB Storage
₹105,999₹112,900
Buy now
23% OFF
Infinix INBook X1 Neo XL22 Laptop Intel Celeron Quad Core 8 GB 256 GB SSD Windows 11
  • Blue
  • 4 GB RAM
  • 128 GB SSD
₹22,990₹29,990
Buy now
42% OFF
Asus ROG Zephyrus G14 GA401QC HZ046TS Laptop
  • Eclipse Gray
  • 8 GB RAM
  • 1 TB SSD
₹89,990₹155,990
Buy now
39% OFF
Asus TUF Gaming A15 FA566IH HN150TS Laptop
  • Fortress Grey
  • 8 GB RAM
  • 1 TB HDD
₹55,600₹90,990
Buy now
25% OFF
Asus ROG Strix G15 G513QR HQ222TS Laptop
  • Eclipse Grey
  • 16 GB RAM
  • 1 TB SSD
₹86,990₹115,990
Buy now
NEXT ARTICLE BEGINS