User Tag List

Results 1 to 8 of 8

Thread: iOS app running in the background, notifications still happening in real time

  1. #1
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)
    ratty's Avatar
    Join Date
    Apr 2012
    Posts
    1,165
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    iOS app running in the background, notifications still happening in real time

    This has been a surprisingly difficult thing to search for on the forum. I found a few old, dead threads but nothing too useful.

    What limitations do we currently have when running iOS apps in the background? Does time still flow actively or is it still just calculated out based on app close and app relaunch times? Can the app interact at all while the phone is sleeping or is that not possible? I imagine the notification object can solve some of this but I'm curious about a specific situation.

    Can an app trigger an action, such as vibrate, at a given interval while the phone is asleep? Say it will vibrate one time every minute, on the minute. Moreover, is it possible for it to actively trigger various actions while asleep, such as vibrating once for each minute that has passed, on the minute (ex., one vibration at 60 seconds, 2 vibrations at 120 seconds, 3 vibrations at 180 seconds, etc.)?

    I'm really hoping that last option is available because I have an interesting idea for an app.

    Thanks for any info!!

  2. #2
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleUnicode Add-onInstall Creator Pro
    StingRay's Avatar
    Join Date
    Nov 2006
    Location
    Austria
    Posts
    1,057
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    Try the ios notification object - i've Tested it, it Works Even if the app is closed

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleUnicode Add-on

    Join Date
    Oct 2011
    Posts
    221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The notifications object seems to work as long as you don't leave the frame to another frame. Whenever I did, my app would crush.
    If you build your app so everything is done within one frame the notifications extension works OK.

    From what I understand, the notifications are handed to the OS, so even if you app is in the background the notifications will continue to pop (but not directly by your app).
    When a notification is popping, it will also activate vibration. I don't think you can change that.

    As far as I've read, when an app is in the background it is practically dead, and you can't do much.
    There are a few things that iOS allows, but they are very limited, and are not reachable by the iOS exporter.
    Note that memory of background apps might be claimed and taken by the OS. When it happens and the user clicks the app again, it will load as if it was just launched (loosing any trace and data before its 'suspended' mode).

    You can regularly save the time (and other data) while running, so it will always be available when you start your app, allowing you to compare the current time to the saved time.

    Hope it helps.

  4. #4
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleUnicode Add-onInstall Creator Pro
    StingRay's Avatar
    Join Date
    Nov 2006
    Location
    Austria
    Posts
    1,057
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    That are Bad News - i have to setup my app to Run in just ONE Frame, if i use the notification obj?!?

  5. #5
    Clicker

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCHTML5 Export ModuleiOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)Universal Windows Platform Export Module (Steam)
    ratty's Avatar
    Join Date
    Apr 2012
    Posts
    1,165
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    ll good into. Sounds like the last idea I mentioned wont be possible, which is a shame (vibrate once at 1 minute, twice at 2 minutes, 3 times at the 3 minute mark, etc.).

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleUnicode Add-on

    Join Date
    Oct 2011
    Posts
    221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by StingRay View Post
    That are Bad News - i have to setup my app to Run in just ONE Frame, if i use the notification obj?!?
    From my experience with it, yes.
    It was supposed to be fixed but was not.

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Mac Export Module (Steam)Universal Windows Platform Export Module (Steam)
    cfullerNY's Avatar
    Join Date
    Oct 2011
    Posts
    363
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    "You can regularly save the time (and other data) while running, so it will always be available when you start your app, allowing you to compare the current time to the saved time."

    is it possible to expose the value of the exact amount of time the app has been minimized for?


    Also,

    how would you go about saving the time/date and comparing? isnt it possible for users to manipulate this by changing the time /date of their devices or is it smarter than that?

  8. #8
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleUnicode Add-on

    Join Date
    Oct 2011
    Posts
    221
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by cfullerNY View Post
    "You can regularly save the time (and other data) while running, so it will always be available when you start your app, allowing you to compare the current time to the saved time."

    is it possible to expose the value of the exact amount of time the app has been minimized for?


    Also,

    how would you go about saving the time/date and comparing? isnt it possible for users to manipulate this by changing the time /date of their devices or is it smarter than that?
    You can't directly expose the time the app was minimized, but you can calculate it yourself if you have the last saved time and now time. If the user changed the device time, I don't think you have a way to detect it, unless the time is set backwards, prior to the last saved time.

Similar Threads

  1. IOS and Real Time INI Access
    By uncleswell in forum iOS Export Module Version 2.0
    Replies: 5
    Last Post: 25th June 2012, 04:00 PM
  2. Real time timer?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 23rd June 2012, 05:51 AM
  3. real time Movie with web cam usb on MMF2, Is possible?
    By daniele in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 31st May 2012, 04:55 PM
  4. Real-time trackbar results
    By Nickydude in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 27th December 2009, 09:28 PM
  5. Real Time Clock System Tutorial
    By Wiiman in forum Articles
    Replies: 28
    Last Post: 4th September 2008, 06:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •