<div dir="ltr">Hi,<div><br></div><div>it&#39;s an iOS feature, that you can use for having the app download something (or check state on your backend), before the alert is being made visible to the end-user:</div><div><a href="https://developer.xamarin.com/guides/ios/application_fundamentals/backgrounding/part_3_ios_backgrounding_techniques/updating_an_application_in_the_background/#Remote_Notifications_iOS_7_and_Greater">https://developer.xamarin.com/guides/ios/application_fundamentals/backgrounding/part_3_ios_backgrounding_techniques/updating_an_application_in_the_background/#Remote_Notifications_iOS_7_and_Greater</a><br></div><div><br></div><div><br></div><div>Also (more interesting, I think) you can use it to send a slient message to the device. E.g. when the app runs (fore/background) the callback is invoked. You can use that to check state on your own backend (a 30 second time window, you have for this), and if needed you could use that to, for instance, issue something local e.g. local notifications (those are better and more handy for several reasons e.g. better control of the badge icon):</div><div><a href="https://developer.xamarin.com/guides/ios/application_fundamentals/backgrounding/part_3_ios_backgrounding_techniques/updating_an_application_in_the_background/#Silent_Remote_Notifications">https://developer.xamarin.com/guides/ios/application_fundamentals/backgrounding/part_3_ios_backgrounding_techniques/updating_an_application_in_the_background/#Silent_Remote_Notifications</a><br></div><div><br></div><div>HTH,</div><div>Matthias</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 3, 2015 at 7:01 PM, Rob Willett <span dir="ltr">&lt;<a href="mailto:rob.aerogear@robertwillett.com" target="_blank">rob.aerogear@robertwillett.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>
<p dir="auto">Hi,</p>

<p dir="auto">We now seem to have something approaching a stable and working UPS configuration. (Famous last words!) Thanks to the Aerogear team for helping resolve the background notifications on Android.</p>

<p dir="auto">As we are tidying up, we noticed (ahem) that we had commented out a few lines in our code. </p>

<pre><code>    if (event[&#39;content-available&#39;])
    {
        // Still not clear what to do with this.
        // push.setContentAvailable(1);
    }
</code></pre>

<p dir="auto">We went back to the Aerogear docs and tried to work out what setContentAvailable really does and what should we do with it. The docs for the function call  are a little sparse, so we looked at the source code and we’re still no wiser. </p>

<p dir="auto">Is there a better explanation of when we should call setContentAvailable and with which parameter? </p>

<p dir="auto">Just to set the ball rolling we <em>think</em> it could mean that when you receive the content-available = 1 flag on iOS, we do a call to get some data from the server ourselves, if the the results of <em>our</em> server call indicate that we have received new data, we set the value to setContentAvailable to 1, if our function call to the server has no data, then we set it to zero and if something failed we set it to 2. </p>

<p dir="auto">So what happens if the value is 0, 1 or 2? if its 2, is a new new call made to something, if its 0 or 1 what happens?</p>

<p dir="auto">Apologies if we’ve missed the point of it, but we’re struggling to understand this.</p>

<p dir="auto">Thanks,</p>

<p dir="auto">Rob.</p>

</div><br>_______________________________________________<br>
Aerogear-users mailing list<br>
<a href="mailto:Aerogear-users@lists.jboss.org">Aerogear-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-users" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Matthias Wessendorf <br><br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a></div>
</div>