tags:

views:

145

answers:

1

I am trying to determine feasibility of certain features required in a (potential) project. I am not (yet) looking for a how-to, just a can-do. I apologize for any vagueness and ignorance: the former due to an NDA that makes Apple's NDA look like GPL, and the latter due to the fact that I have no iPhone or MAC experience.

I do have a solid understanding of objective-c and interface builder (going back to NextStep) and some PDA development experience, so I'll probably understand the answers, even if my questions are naive. I have done a bit of browsing, so I know some buzzwords.

I can't go into detail about the actual project, but I have come up with a lame analogy.

  • a large number of users in the same room are asked to complete task(s) in the app (say a puzzle)
  • they are under supervision, but the monitor cannot watch them all closely
  • they are not allowed to leave the application until done.
  • they cannot send/receive phone calls or messages during the task.
  • the monitor receives notification of various steps during the task
  • the monitor is notified when the task is completed, or the app is exited
  • the app sends a heartbeat, so the monitor also knows if signal is lost
  • Jailbreak is not an option.
  • The app should also work on iPod Touch.

So the things I need to do that seem dicey to me are

  • can I turn off (or require the user to turn off) phone and sms but still be able send http to my server
  • can I prevent an app from being switched out (even if, say an alarm app triggers or the phone rings).
  • failing prevention, can I at least detect any of these events and notify my server.
  • failing notification, can I record the event for the monitor to check later.

The user will be aware (and in fact welcome) these restrictions. It's a trust issue - the user must not seek help or use a helper app to solve the puzzle, and wants the monitor (and other contestants) to know that he did not. It's feasible for the user to click on an "OK, I understand and approve" screen at the beginning, but not for each communication to the server.

The app would only communicate with a central server (run by my company) - the monitor would not be able to buy the server software, and the url's of the server would not be user (or monitor) modifiable.

Hey! This looks like an app for taking exams. Not what I am doing, but that would be cool too!

EDIT --

I changed the title and am adding a few more parts to the question, based in part on mmc's answer. The App may run in an offline mode that would have to do the following:

So using the exam analogy, the user off line experience would be something like this

  1. Launch App
  2. App download test questions, registers start time, etc.
  3. Turn off phone (if app can't do it by itself)
  4. Disable any app that might interrupt my App (can app do this?)
  5. Resume and Take Test
  6. Indicate test done (or finish last problem).
  7. Turn on phone (if app can't) and restart App (if needed).
  8. App uploads test results and log of any interruptions.

So the question becomes

  • Am I sure that I at least get to log any interruption I can't prevent
  • can I know the cause of the interruption (phone answered, alarm launch, user initiated)?
  • can the user be prevented from modifying the log
  • can I know what other Apps are running when I start? (to guard against a daemon that occasionally displays a hint or something.

I would still like to run with real time uploads, so a few other ideas come to mind.

  • If I can reliably detect and record that the phone or another app was used, that might be almost as good as preventing it.
  • Can the user prevent the phone from ringing even if it's on (eg. call forward + ringer off)
  • Can my app know if the ringer is off
  • Same question for sms messaging
  • If I can't block it, can the user just ignore (silent) call or message and not leave my App. Would my app know that?
+3  A: 

Sounds like you might be better off doing away with the phone, and making it exclusive to the iPod Touch.

You've nailed your trouble spots.

  • There is no way to disable phone functionality, and at the same time maintain network functionality of any type (3G, WiFi, or bluetooth) If you disable the phone operations with Airplane mode, all of them are disabled.
  • There is no way to prevent the Home button from returning you to Springboard
  • You can notify a server of a premature app interruption (there is an applicationWillTerminate: method on your app delegate) but is not reliable. If the operation takes too long, your app will be forcibly terminated.
  • You could write to the local file system that a premature interruption happened, and this would be far more reliable, as this operation would be much faster.
mmc
I'm accepting this partial answer only because it led me to the conclusion that the project is not feasible.
Lucky