简体   繁体   English

前台应用程序处于什么状态但几分钟后显示为非活动状态?

[英]What is the state of App in foreground but appears inactive after few minutes?

I'm developing an iPad app, and I noticed a state where app appears to be sleep in foreground.我正在开发 iPad 应用程序,我注意到应用程序在前台似乎处于睡眠状态。

The step to reproduce:重现步骤:

  1. Set screen on time for 15 minutes.将屏幕时间设置为 15 分钟。
  2. Launch the app and wait for more than 5 minutes启动应用程序并等待 5 分钟以上
  3. When click the screen after 5 minutes, the app appears to be inactive for 2 seconds and not accepting new events. 5 分钟后单击屏幕时,该应用程序似乎处于非活动状态 2 秒,并且不接受新事件。
  4. After 2 seconds, the app registers that touch and begin responding 2 秒后,应用程序注册触摸并开始响应

I'm wondering is the app goes from active foreground to inactive foreground after certain amount of inactivity in foreground?我想知道在前台处于一定程度的非活动状态后,应用程序是否从活动的前台变为非活动的前台?

If so, how long will it take for the app to go to that foreground inactive state.如果是这样,应用程序进入前台非活动状态需要多长时间。 Is there any delegate or notifications that listens to that event happening?是否有任何委托或通知可以侦听该事件的发生?

Probably app is Inactive state - The app is running in the foreground, but not receiving events.应用程序可能处于非活动状态 - 应用程序在前台运行,但未接收事件。 An iOS app can be placed into an inactive state, for example, when a call or SMS message is received.可以将 iOS 应用程序置于非活动状态,例如,在收到电话或 SMS 消息时。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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