Its immediately on entering the background, but after that it won't show the error again unless I force quit the app and run it again, i.e., switching between foreground and background won't trigger the error again.
stop is making a network call to our analytics system. It never runs the background fetch handler at all. No location or background audio, the only native interface is to the analytics SDK and its stopped in the stop method. I'll try removing the analytics and any network calls in Background Fetch and go from there. Cheers, Nick On Tuesday, August 23, 2016 at 11:56:52 AM UTC+12, Steve Hannah wrote: > > 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] <javascript:>> 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] >> <javascript:>. >> 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/798efef3-8273-40c3-a64a-b5c3e700123d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
