Is that message printed immediately upon entering the background? And is it every time it enters the background? Do you have anything fancy going on inside your stop() method? e.g. does stop() wait for anything to complete, or does it start any longer running work? Does it ever start to run your background fetch handler at all? Do you have any other background stuff going on at all in your app? (e.g. background locations, background audio, native interfaces with background stuff, etc...) Make sure you are calling the onComplete callback inside your background handler - and that it isn't running too long. (I suggest just putting in a simple System.out.println() and the callback for testing until you get it working).
And always remember, for iOS, that you have virtually no control over when or if iOS will call your background handler. Steve On Mon, Aug 22, 2016 at 4:33 PM, <[email protected]> wrote: > Using the sample here: https://www.codenameone.com/javadoc/com/codename1/ > background/BackgroundFetch.html and ensuring that I've added > ios.background_modes=fetch to the build hints I get the following error in > the console everytime the app goes into the background and nothing is ever > output from the background task. Works on Android. > > > Requesting process (process details in here) is suspended and cannot > obtain assertions > > Display isBackgroundFetchSupported() returns true. Application Exits is > NOT ticked. > > > -- > You received this message because you are subscribed to the Google Groups > "CodenameOne Discussions" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > Visit this group at https://groups.google.com/ > group/codenameone-discussions. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/codenameone-discussions/6e0577ec-4df9-4258-8957- > 863e746db6eb%40googlegroups.com > <https://groups.google.com/d/msgid/codenameone-discussions/6e0577ec-4df9-4258-8957-863e746db6eb%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Steve Hannah Software Developer Codename One http://www.codenameone.com -- You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/codenameone-discussions. To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/CAGOYrKXvR-89G0ZLg0qJaTSMOO8_GA4yfW7UA%2Bj60ZJ_vHz9tQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
