gpt4 book ai didi

c# - 当我的应用程序运行时,是否可以检测 float /多窗口应用程序的使用?

转载 作者:行者123 更新时间:2023-11-29 05:53:30 25 4
gpt4 key购买 nike

我们的项目是一个基于移动设备的考试应用程序。该应用程序应该能够在考试时检测 float 应用程序/多窗口和应用程序切换的使用。我们应该在这个项目中使用 xamarin。

如果学生使用 float /多窗口应用程序或切换到其他应用程序,考试 Activity 应终止。

最佳答案

谈论iOS。有可能的。系统有很多执行状态: Apple Documentation我将谈论其中之一。

AppDelegate内部,您可以获得用户离开应用程序的确切时刻。

This method is called to let your app know that it is about to move from the active to inactive state...

// Swift
class AppDelegate: UIResponder, UIApplicationDelegate {
// ...
func applicationWillResignActive(_ application: UIApplication) {
// do something
}
}

希望这可以帮助你。

关于c# - 当我的应用程序运行时,是否可以检测 float /多窗口应用程序的使用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55432241/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com