O'Reilly logo

LiveCode Mobile Development HOTSHOT by Edward D Lavieri Jr.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using locational services

Locational services allow applications to use information gathered from networks (Wi-Fi, cellular, and GPS) to determine the device's location. This information can be used in a variety of ways to include mapping and providing the user with locality-relevant information.

Prepare for Lift Off

Let's use an advanced feature with another pop up. We'll determine the location of the mobile device and display the results in a standard pop-up dialog.

Engage Thrusters

The first thing we need to do is to make a copy of the original Hello Planet! LiveCode file. You can name the copied file HelloPlanet_v3.livecode.

With the LiveCode source file open, add the following code at the stack level:

on preOpenStack local theLocation if mobileSensorAvailable("location") ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required