• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

AIR + iOS + geolocation updates + screen off = FAIL

New Here ,
Oct 05, 2011 Oct 05, 2011

Copy link to clipboard

Copied

Where do I start... I have been trying to tackle this issue for quite some time now and every time I think I have the answer something else comes along to crash the party.

I am in the process of building a multi-screen AIR mobile application with the AIR 3.0 SDK that records geolocation updates as they are sent from the device.

Everything works fine on Android but when I test on iOS here are my findings...

Geolocation updates work fine while the app is active.

In order for you app to be eligible for background services you need to set the UIBackgroundModes in your app-xml file for the service you would like to enable... in my case 'location' (which I did)

I found that doing this alone will not allow you to receive the location updates when the app is in the background. As soon as the app is "minimized", it goes into a suspended state and no code is being executed until the app beomes active again ...therefore none of the location updates are received.

I found that setting the 'audio' AND 'location' values together somehow allows me to run code while the app is in the background, just not while the screen is turned off.  The moment you press the power button to turn the screen off, the app goes into a suspended state again.

To test if code can be run, I have set up an event listener that gets triggered when the app is deactivated and activated.  I am setting a timer the moment the app gets deactivated and incrementing a variable every 100 milliseconds while the app is inactive.  When the app becomes active again I report the number back in a debug textfield.  If I dectivate the app by pressing the home button or open even open another app, the number that gets reported back when I go back to my app is accurate... but as soon as I press the power button to shut the screen off, the number stops incrementing shortly after.

I have seen plenty of native iOS geolocation-based apps get location updates while the screen is off, why is this not the case for an AIR iOS app? Is there a workaround for this? Does someone at Adobe need to fix this issue?  At this point, I'm not even sure Native Extensions would do the trick... Am I doing something wrong?

ANY help would be greatly appreciated.

Thanks!

TOPICS
Development

Views

2.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 12, 2011 Oct 12, 2011

Copy link to clipboard

Copied

Hi:

The issue you are facing on iOS is because of the known bug where there are no events fired when the screen is off(including the time events). This bug will be fixed in future releases. I will take care of posting on this thread when the release with this fix is out.

Thanks for posting.

Regards,

Saumitra Bhave

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 12, 2011 Oct 12, 2011

Copy link to clipboard

Copied

Can you give a more specific timetable than "in future releases"? Are we

talking days, weeks, months, years? It's great to know that this will be

fixed, but we would like to know when to expect a fix.

Thanks,

Ferro

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 12, 2011 Oct 12, 2011

Copy link to clipboard

Copied

It's "days". But quite a lot of them.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Nov 08, 2011 Nov 08, 2011

Copy link to clipboard

Copied

I am developing a music app and I must do transitions between songs, even if the device's screen is off.

I really need this adobe Air improvement. Have more informations today ? Could you tell me when it will be released ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 21, 2012 Oct 21, 2012

Copy link to clipboard

Copied

LATEST

Has this been fixed? This still appears to be broken in 3.5 Beta exactly as described above here...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 01, 2012 Apr 01, 2012

Copy link to clipboard

Copied

Have there been any recent developments on fixing this issue?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jul 19, 2012 Jul 19, 2012

Copy link to clipboard

Copied

I think it was corrected with AIR3.3, BUT it is still there when you set renderMode to "direct".

Annoying.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines