iOS4 and UDP/TCP background support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Can you explain this a little bit more?

My application is "paused" as soon as it enters background. The application
has the VoIP flag set in the plist.
TCP is working as is should, i.e. it wakes the application when traffic
arrives.

>So any udp solution has to periodically get data from the server to be
active.
This can not be the only secret as the application directly goes to sleep
when it is pushed to background. Sending e.g. a Invite to the device will
not wake it up.
Trying to send data will not work as well as the application no longer
active.

The only thing I have found is to use
"beginBackgroundTaskWithExpirationHandler" which will keep the application
alive for 10 minutes. With this, UDP works great.
But I have not found any way to extend this time in background.  Sending
data over the UDP socket does not "reset" the 10 minutes background time.
So, what is the magic with sending UDP data?

Can someone explain this a little bit better for me?

Can I have misconfigured something, as sending UDP data does not keep my
application alive?

Can I, should I, am I allowed to in someway loop multiple
beginBackgroundTaskWithExpirationHandler?


Best Regards,
Ken


2011/7/17 Joseph Rukshan Fonseka <rukshanf at optusnet.com.au>

> When an iOS app is Using backgroundmode of VoIP the iOS will keep the app
> active even when in the background as long as there is network traffic. This
> doesn't matter if it is tcp or udp. However if it is udp the iOS does not
> monitor the traffic inthe socket and resume your app after long periods of
> network inactivity. So any udp solution has to periodically get data from
> the server to be active. This drains the battery. Best solution to use for
> udp is to take advantage of push notifications to wake up your app.
>
> Sent from my iPhone
>
> On 17/07/2011, at 6:46 AM, I?aki Baz Castillo <ibc at aliax.net> wrote:
>
> > 2011/7/16 Eric Chamberlain <eric at ringfree.com>:
> >> Background applications that listen for UDP traffic are not supported.
> >
> > Is this true for any version of iPhone's iOS? Recently I tested a
> > PJSIP softphone in an iPhone, using SIP over UDP. The registrar sends
> > periodic OPTIONS (each 40 seconds) to the client (i.e. to mantain NAT
> > open) and even in background mode the OPTIONS is always replied (200)
> > by PJSIP so it can also receive incoming INVITE's after long time in
> > background.
> >
> > Do I miss something?
> >
> > --
> > I?aki Baz Castillo
> > <ibc at aliax.net>
> >
> > _______________________________________________
> > Visit our blog: http://blog.pjsip.org
> >
> > pjsip mailing list
> > pjsip at lists.pjsip.org
> > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
> >
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20110831/da6502fc/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux