0

Our project is a mobile based examination app. The app should be able to detect the use of floating apps/multiwindow and app switching while taking an exam. We're supposed to use xamarin for this project.

If the student used a floating/multiwindow app or switched to another app, the exam activity should terminate.

1 Answers1

0

Talking about iOS. It is possible. System has a bunch of execution states: Apple Documentation I will talk about one of them.

Inside of the AppDelegate you can get the exact moment that users are leaving the app.

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
  }
}

I hope this can help you.

J. Lopes
  • 1,336
  • 16
  • 27
  • You can also set your app to "requires full screen" to prevent side by side apps https://stackoverflow.com/questions/30765157/is-it-possible-to-opt-your-ipad-app-out-of-multitasking-on-ios-9 – Paulw11 Mar 30 '19 at 20:23
  • There is also automatic assessment configuration https://stackoverflow.com/questions/48909134/automatic-assessment-configuration-in-ios – Paulw11 Mar 30 '19 at 20:32