Class

# LocationNotification

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

A notification that is based upon entering or exiting a geographic region.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                                          | Type                                        | Read-Only | Shared |
|---------------------------------------------------------------|---------------------------------------------|-----------|--------|
| `Badge<locationnotification.badge>`                           | `Integer</api/data_types/integer>`          | ✓         |        |
| `Body<locationnotification.body>`                             | `String</api/data_types/string>`            | ✓         |        |
| `DeliveryDate<locationnotification.deliverydate>`             | `DateTime</api/data_types/datetime>`        | ✓         |        |
| `Handle<locationnotification.handle>`                         | `Ptr</api/data_types/additional_types/ptr>` | ✓         |        |
| `Identifier<locationnotification.identifier>`                 | `String</api/data_types/string>`            | ✓         |        |
| `Latitude<locationnotification.latitude>`                     | `Double</api/data_types/double>`            | ✓         |        |
| `LocationIdentifier<locationnotification.locationidentifier>` | `String</api/data_types/string>`            | ✓         |        |
| `Longitude<locationnotification.longitude>`                   | `Double</api/data_types/double>`            | ✓         |        |
| `Mode<locationnotification.mode>`                             | `Modes<locationnotification.modes>`         | ✓         |        |
| `Radius<locationnotification.radius>`                         | `Double</api/data_types/double>`            | ✓         |        |
| `Repeats<locationnotification.repeats>`                       | `Boolean</api/data_types/boolean>`          | ✓         |        |
| `Subtitle<locationnotification.subtitle>`                     | `String</api/data_types/string>`            | ✓         |        |
| `Thread<locationnotification.thread>`                         | `String</api/data_types/string>`            | ✓         |        |
| `Title<locationnotification.title>`                           | `String</api/data_types/string>`            | ✓         |        |
| `UserInfo<locationnotification.userinfo>`                     | `Dictionary</api/language/dictionary>`      | ✓         |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                                          | Parameters                                                                                  | Returns                            | Shared |
|---------------------------------------------------------------|---------------------------------------------------------------------------------------------|------------------------------------|--------|
| `ContainsCoordinate<locationnotification.containscoordinate>` | latitude As `Double</api/data_types/double>`, longitude As `Double</api/data_types/double>` | `Boolean</api/data_types/boolean>` |        |

## Enumerations

<div id="locationnotification.modes">

<div class="rst-class">

forsearch

</div>

</div>

LocationNotification.Modes

### Modes

> The events by which a <span class="title-ref">LocationNotification</span> can be triggered.
>
> | Enum                 | Description                                                           |
> |----------------------|-----------------------------------------------------------------------|
> | NotifyOnEntry        | Notifications will occur when the device enters the region.           |
> | NotifyOnExit         | Notifications will occur when the device exits the region.            |
> | NotifyOnEntryAndExit | Notifications will occur when the device enters and exits the region. |

## Property descriptions

<div id="locationnotification.badge">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

LocationNotification.Badge

**Badge** As `Integer</api/data_types/integer>`

> The number that appears on the app icon when the notification is presented.
>
> This property is read-only.

<div id="locationnotification.body">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

LocationNotification.Body

**Body** As `String</api/data_types/string>`

> The details of the notification message.
>
> This information may not be shown if the device is locked and the user has hidden message details.
>
> This property is read-only.

<div id="locationnotification.deliverydate">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

LocationNotification.DeliveryDate

**DeliveryDate** As `DateTime</api/data_types/datetime>`

> When the notification was delivered.
>
> This property is read-only.

<div id="locationnotification.handle">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

LocationNotification.Handle

**Handle** As `Ptr</api/data_types/additional_types/ptr>`

> A pointer to the notification for use with declares.
>
> This property is read-only.

<div id="locationnotification.identifier">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

LocationNotification.Identifier

**Identifier** As `String</api/data_types/string>`

> The UUID that uniquely identifies the notification.
>
> The UUID is created when the Notification is created.
>
> This property is read-only.

<div id="locationnotification.latitude">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

LocationNotification.Latitude

**Latitude** As `Double</api/data_types/double>`

> The location's north/south angular distance from the equator.
>
> This property is read-only.

<div id="locationnotification.locationidentifier">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

LocationNotification.LocationIdentifier

**LocationIdentifier** As `String</api/data_types/string>`

> A value that can be used by the app to identify the location.
>
> This value is something your assign when the notification is sent using `MobileNotifications<mobilenotifications.send>` to allow it to identify the location when examining an incoming notification. For example, if your app was going to send out a notification when the user arrived at their home, you might use "home" as the location identifier.
>
> This property is read-only.

<div id="locationnotification.longitude">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

LocationNotification.Longitude

**Longitude** As `Double</api/data_types/double>`

> The location's east/west angular distance from the equator.
>
> This property is read-only.

<div id="locationnotification.mode">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

LocationNotification.Mode

**Mode** As `Modes<locationnotification.modes>`

> Dictates when the notification will be displayed based upon entering and/or exiting the region.
>
> This property is read-only.
>
> Set the EmpireStateBuilding notification so that it's only displayed when the device enters the region defined within it:
>
> ``` xojo
> EmpireStateBuilding.Mode = LocationNotification.Modes.EntryOnly
> ```

<div id="locationnotification.radius">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

LocationNotification.Radius

**Radius** As `Double</api/data_types/double>`

> The distance in meters that defines the size of the notification's region.
>
> This property is read-only.

<div id="locationnotification.repeats">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

LocationNotification.Repeats

**Repeats** As `Boolean</api/data_types/boolean>`

> If `True</api/language/true>`, the notification will repeat.
>
> The shortest interval allowed is 60 seconds.
>
> This property is read-only.

<div id="locationnotification.subtitle">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

LocationNotification.Subtitle

**Subtitle** As `String</api/data_types/string>`

> A secondary line of text that appears below the title of the notification message.
>
> This information may not be shown if the device is locked and the user has hidden message details.
>
> This property is read-only.

<div id="locationnotification.thread">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

LocationNotification.Thread

**Thread** As `String</api/data_types/string>`

> Identifies the thread to which the notification belongs.
>
> Threads are a set of characters you create which allow notifications to be grouped together in the iOS notifications user interface.
>
> This property is read-only.

<div id="locationnotification.title">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

LocationNotification.Title

**Title** As `String</api/data_types/string>`

> The title of the notification message.
>
> This property is read-only.

<div id="locationnotification.userinfo">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

LocationNotification.UserInfo

**UserInfo** As `Dictionary</api/language/dictionary>`

> Information sent along with the notification.
>
> The underlying data structure is `JSON</api/text/json/jsonitem>` format.
>
> This property is read-only.

## Method descriptions

<div id="locationnotification.containscoordinate">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

LocationNotification.ContainsCoordinate

**ContainsCoordinate**(latitude As `Double</api/data_types/double>`, longitude As `Double</api/data_types/double>`) As `Boolean</api/data_types/boolean>`

> Returns `True</api/language/true>` if the coordinate passed is inside the region defined by the this <span class="title-ref">LocationNotification</span>.
>
> See if the device is within 100 meters of the EmpireStateBuilding location defined in this notification:
>
> ``` xojo
> If EmpireStateBuilding.ContainsCoordinate(MobileLocation1.Latitude, MobileLocation1.Longitude) Then
>    MessageBox("You're close to the Empire State Building!")
> End If
> ```

## Notes

A <span class="title-ref">LocationNotification</span> is received by the `NotificationReceived<mobilenotifications.notificationreceived>` event.

The geographic region of a <span class="title-ref">LocationNotification</span> is defined as a circular area Radius meters from the Latitude and Longitude specified.

## Compatibility

|                       |        |
|-----------------------|--------|
| **Project Types**     | Mobile |
| **Operating Systems** | iOS    |

<div class="seealso">

`Notification</api/user_interface/notifications/notification>` parent class; `Notification</api/user_interface/notifications/notification>` class, `NotificationReceived<mobilenotifications.notificationreceived>` event.

</div>
