Results 1 to 5 of 5
Discuss Keeping a backgrounded application alive at the iPhone Developer Exchange - Hackint0sh.org; Hi, I'm writing an external GPS decoder that uses a daemon to decode GPS data ...
  1. #1
    Newbie Array

    Join Date
    May 2012
    Posts
    2
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default Keeping a backgrounded application alive

    Hi,

    I'm writing an external GPS decoder that uses a daemon to decode GPS data (from COM port) and a mobilesubstrate module that replaces the standard CoreLocation implementation in the client apps (any app that uses the standard location services). When my GPS device is plugged, the standard CoreLocation don't get called, only my implementation is used.
    All is working fine except that when the client application is backgrounded, it is suspended immediately or after 10 minutes if I start a background task. After being suspended, the location can no more be updated.
    I want to reproduce the "location" background mode, so that the application doesn't get suspended. Can anyone tell me how to prevent the client application from being suspended or how to keep it alive from my daemon ?
    Thanks.



  2. #2
    sam
    sam is offline
    Chief of Administration
    iPhone Dev Team
    Array sam's Avatar

    Join Date
    Jun 2007
    Posts
    1,852
    Post Thanks / Like
    Downloads
    35
    Uploads
    277
    Rep Power
    10

    Default

    Well that is actually the "multitasking" Apple provides. If you want to have a daemon, you need a jailbreak and start a daemon as system service on the device which is permanently running as a service. You need to make the client code to be really just a frontend only.
    If you just want to support hackint0sh.org with a donation click here.
    Follow me on twitter: http://twitter.com/sam_hackint0sh

  3. #3
    Newbie Array

    Join Date
    May 2012
    Posts
    2
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Thanks for your answer sam.
    I've already done what you say. I have a permanently running daemon and client code that handles updates from that daemon. My problem is that the client code is suspended 10 minutes after the client application was backgrounded and no more handles the updates from the daemon.
    I'm searching a way to either prevent suspension of the running application, or to wake the application from the daemon.
    Do you know how to do this ?

  4. #4
    sam
    sam is offline
    Chief of Administration
    iPhone Dev Team
    Array sam's Avatar

    Join Date
    Jun 2007
    Posts
    1,852
    Post Thanks / Like
    Downloads
    35
    Uploads
    277
    Rep Power
    10

    Default

    The problem ist, that is how the multitasking in iOS works, you will need to update your app from the daemon on re-startup. It's not running at all of the 10 minutes are over. If you want to inform the user about event from the daemon you need to use push.
    If you just want to support hackint0sh.org with a donation click here.
    Follow me on twitter: http://twitter.com/sam_hackint0sh

  5. #5
    Newbie Array

    Join Date
    Jan 2013
    Posts
    5
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    I don't think you can do much because it will timeout after a time limit.


 

 

Similar Threads

  1. How to keep 3G alive with screen off ?
    By Tex-Twil in forum iOS 4.x (iPhone OS 4.x)
    Replies: 0
    Last Post: 06-15-2011, 10:49 AM
  2. Replies: 0
    Last Post: 05-11-2011, 03:30 PM
  3. How to Keep connections alive when locked?
    By thezigpc in forum General
    Replies: 1
    Last Post: 01-25-2008, 04:42 AM
  4. Keeping the EDGE connection alive?
    By Eluzion in forum General
    Replies: 0
    Last Post: 09-17-2007, 12:45 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 11:27 PM.
twitter, follow us!