Location services on the new iOS VM

44 views
Skip to first unread message

Tim Gaul

unread,
Mar 27, 2015, 4:41:04 AM3/27/15
to codenameone...@googlegroups.com
Hi all

I build my app using the new VM as a test and my section of code is as follow:

            setLocation(LocationManager.getLocationManager().getCurrentLocationSync(20000));  

           
if (getLocation() == null) {
               
Location l = LocationManager.getLocationManager().getLastKnownLocation();
           
}

iOS appears to take 20 seconds to get the location, but no matter what I do it returns coordinates 0, 0 whether for last known location or not. I'm not sure which line is returning the coordindates.

I've rebuild with the swtich ios.newVM=false and the am no longer experiencing the issue.

Please let me know if I'm missing something, perhaps an additional switch with the new VM, or if logs are required?

Thanks

Tim

If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans
Desktop OS
Device iPhone 5, iOS 7.1 and iOS 8.2

Steve Hannah

unread,
Mar 27, 2015, 12:44:42 PM3/27/15
to codenameone...@googlegroups.com
If you're on iOS 8, you need to use the ios.locationUsageDescription build hint for location services to work.

Steve

--
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 codenameone-discu...@googlegroups.com.
Visit this group at http://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/857df07f-06c5-4ed0-abd5-42b1568b475f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Steve Hannah
Software Developer
Codename One

Shai Almog

unread,
Mar 27, 2015, 12:53:30 PM3/27/15
to codenameone...@googlegroups.com
Hi,
check out the second paragraph here:
http://www.codenameone.com/blog/location-ios-beta-testing-better-input.html

We should probably find a way to refine this a bit.

Tim Gaul

unread,
Mar 28, 2015, 3:44:50 AM3/28/15
to codenameone...@googlegroups.com
Thanks I'll check it out.


On Friday, March 27, 2015 at 6:44:42 PM UTC+2, Steve Hannah wrote:
If you're on iOS 8, you need to use the ios.locationUsageDescription build hint for location services to work.

Steve
On Fri, Mar 27, 2015 at 1:41 AM, Tim Gaul <exafr...@gmail.com> wrote:
Hi all

I build my app using the new VM as a test and my section of code is as follow:

            setLocation(LocationManager.getLocationManager().getCurrentLocationSync(20000));  

           
if (getLocation() == null) {
               
Location l = LocationManager.getLocationManager().getLastKnownLocation();
           
}

iOS appears to take 20 seconds to get the location, but no matter what I do it returns coordinates 0, 0 whether for last known location or not. I'm not sure which line is returning the coordindates.

I've rebuild with the swtich ios.newVM=false and the am no longer experiencing the issue.

Please let me know if I'm missing something, perhaps an additional switch with the new VM, or if logs are required?

Thanks

Tim

If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans
Desktop OS
Device iPhone 5, iOS 7.1 and iOS 8.2

--
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 codenameone-discussions+unsub...@googlegroups.com.

Tim Gaul

unread,
Mar 28, 2015, 3:45:10 AM3/28/15
to codenameone...@googlegroups.com
Thanks Shai. Let me see how it goes :)
Reply all
Reply to author
Forward
0 new messages