Hi @zv713,
Did you submit this through the official bug/issue report system, or via e-mail?
Brent
Though the official system found in the Report a Bug link up top.
Thank you. You may not receive a prompt e-mail, as we have to prioritize this issue and test it on our side… but it’s logged in our tracking system now.
Brent
I’ve dug through the bug tracker and I don’t see any thing when searching for keywords from this post. Can you try and re-submit it? You should get an automated message (not from a human) with the case # in it. Please check your spam posts to see if it when there.
Rob
Just submitted it again and got this message on submit “Thank you for your submission. We will do our best to evaluate your case and respond as quickly as possible.”, but again no automated email.
Check your spam folder?
Rob
nothing. can I attach the file here?
That won’t get the project to engineering. Do you know what you titled the bug? Give me something to search on? I even tried to search for your email address and didn’t find anything.
Rob
I believe it was titled something along the lines of “GPS location firing constantly on device”
Are you using the “Report a Bug” link at the top of the page? That message doesn’t match up with what our bug tracker seems to output. I’m not finding anything open, filed in the past month or so with GPS and location in the submission.
Rob
Ya. Should I try the email method?
We just want to make sure you’ve not found a bad link. Email support@coronalabs.com with your project attached and your description in the email. Make the subject what you want the title of the bug report to be. That will work too.
Rob
Email sent. case # 34185
Thanks for getting this filed.
Rob
Engineering has looked at this, and it seems like it’s going to be difficult to do and could create regression issues. They suggest the following:
Instead of doing:
local function listener(event) Runtime:removeEventListener("location", listener) end Runtime:addEventListener("location", listener)
you can do:
local object = {} object.location = function(event) Runtime:removeEventListener( "location", object) end Runtime:addEventListener("location", object)
which is known to work.
Rob
This is great news!!! Can this somehow also be used to turn gps off while mapviewer is in use? If I only want to provide mapviews and not plot user location on the map etc it is a waste of battery juice to keep the gps running. Any ideas on whether this trick can help there? Thanks
Filed a bug relating to removing a mapView, and the GPS remains permanently on (during suspend). Case 34342.
Not being able to remove a listener from inside a listener function is a serious bug that is far bigger than the scope of Maps and location, it needs to be fixed.
Have you tried to put the remove inside of a short timer.performWithDelay()? Perhaps 10ms would do.
Rob
Unrelated timers are not a fix, if the location request takes longer than 10 seconds and the code isn’t catching the exception (which it shouldn’t have to) it will cause a potentially app breaking bug.
Your workaround works perfectly assuming you don’t need the event which isn’t passed though in build 2520, instead you get a function?