Search code examples
iosobjective-cpush-notificationapple-push-notificationsphone-call

Objective C - Ensuring that the iPhone user has un divided attention for the app. Disabling all notfications


I have to develop an app that has to have an undivided attention of the user. Following things should NOT happen while the user is using the app:

  1. Incoming Phone Call
  2. Device going to sleep
  3. Battery draining
  4. Push notes from other apps
  5. Local Notifications for Calendar Events
  6. Alarms/Reminders

I have to see if all of these are viable to achieve directly or indirectly. Here is my report for all

  1. Incoming call

    • Can't
      1. Cannot block phone to take calls.
      2. Prevent user from seeing the incoming call screen
    • Can
      1. Alert user before starting the operation that he should put his phone on Do Not Disturb mode.
  2. Device going to sleep

    [UIApplication sharedApplication].idleTimerDisabled = YES;

  3. Battery Draining

    • Can
      1. Checking the battery status and compare it to minimum required battery so that the operation performs.
      2. If the enough battery is not left, alert the user that he should put the battery on charge.
      3. Monitoring the battery and keeping a check until the operation is complete.
  4. Push Notes from other apps

    • Can't
      1. Cannot disable push notes form other apps form my app
    • Can
      1. Can check the status of internet connectivity (wifi, GSM, etc)
      2. Alert the user and tell him to disable all the internet connectivity options

These are my compromises in Can sections. Please help me find a way for 5, 6 points Also, if you can suggest a better solution (approach) for 1,2,3,4.

Thank you


Solution

  • You are not going to be able to make an app that gets the undivided attention of the user. But, seeing your approach, you obviously know this.

    I think your statements are mostly correct. However, there is probably little point in making users put their phone in Do Not Disturb mode, because I think that only has an effect while the device is locked (you can easily test this out). From http://support.apple.com/kb/HT5463:

    With Do Not Disturb, you can silence calls, alerts, and notifications that you get while your device is locked.

    Points 5 and 6 are closely related to point 1: there is no stopping them.