简体   繁体   中英

How to prevent the Apple Watch from going to sleep?

We are working on an Apple Watch project, but the watch goes to sleep if uninterrupted with.

Is there any way to prevent it from going to sleep?

据我所知和对此主题的其他搜索,目前还没有api可用于以编程方式启用甚至禁用Apple Watch的睡眠模式。

No-Sleep API

Currently, there is no API to disable Apple Watch from going to sleep.

You may wait until watchOS 3.

Changing Sleep Time By User

Any user can go to this path:

Settings -> General -> Wake Screen

And set the time to a long time.

Unfortunately, only the user can change this and there is no way to do it programmatically.

NOTE: If you want the screen to resume your activity after waking up, you should ask user to do so here:

Settings -> General -> Wake Screen -> Resume Last Activity

Note that according to Owen, keeping the watch awake would kill the battery quickly.

Conclusion

1- No API is set.

2- User can change sleep time.

3- User can select to resume last activity when the Apple Watch wakes up.

Because of the power requirements, keeping the watch awake would kill the battery quickly. However, you may be concerned that when the watch does go to sleep, it doesn't re-wake to your app. This can be remedied at the user level, on your iOS device using the Watch App, using General->Wake Screen-> and checking "Resume Last Activity"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM