Class
LocationNotification
Description
A notification that is based upon entering or exiting a geographic region.
Properties
Name |
Type |
Read-Only |
Shared |
---|---|---|---|
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
|||
✓ |
Methods
Name |
Parameters |
Returns |
Shared |
---|---|---|---|
Enumerations
LocationNotification.Modes
Modes
The events by which a LocationNotification 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
LocationNotification.Badge
Badge As Integer
The number that appears on the app icon when the notification is presented.
This property is read-only.
LocationNotification.Body
Body As String
The details of the notification message.
This property is read-only.
This information may not be shown if the device is locked and the user has hidden message details.
LocationNotification.DeliveryDate
DeliveryDate As DateTime
When the notification was delivered.
This property is read-only.
LocationNotification.Handle
Handle As Ptr
A pointer to the notification for use with declares.
This property is read-only.
LocationNotification.Identifier
Identifier As String
The UUID that uniquely identifies the notification.
This property is read-only.
The UUID is created when the Notification is created.
LocationNotification.Latitude
Latitude As Double
The location's north/south angular distance from the equator.
This property is read-only.
LocationNotification.LocationIdentifier
LocationIdentifier As String
A value that can be used by the app to identify the location.
This property is read-only.
This value is something your assign when the notification is sent using MobileNotifications 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.
LocationNotification.Longitude
Longitude As Double
The location's east/west angular distance from the equator.
This property is read-only.
LocationNotification.Mode
Mode As 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:
EmpireStateBuilding.Mode = LocationNotification.Modes.EntryOnly
LocationNotification.Radius
Radius As Double
The distance in meters that defines the size of the notification's region.
This property is read-only.
LocationNotification.Repeats
Repeats As Boolean
If True, the notification will repeat.
This property is read-only.
The shortest interval allowed is 60 seconds.
LocationNotification.Subtitle
Subtitle As String
A secondary line of text that appears below the title of the notification message.
This property is read-only.
This information may not be shown if the device is locked and the user has hidden message details.
LocationNotification.Thread
Thread As String
Identifies the thread to which the notification belongs.
This property is read-only.
Threads are a set of characters you create which allow notifications to be grouped together in the iOS notifications user interface.
LocationNotification.Title
Title As String
The title of the notification message.
This property is read-only.
LocationNotification.UserInfo
UserInfo As Dictionary
Information sent along with the notification.
This property is read-only.
The underlying data structure is JSON format.
Method descriptions
LocationNotification.ContainsCoordinate
ContainsCoordinate(latitude As Double, longitude As Double) As Boolean
Returns True if the coordinate passed is inside the region defined by the this LocationNotification.
See if the device is within 100 meters of the EmpireStateBuilding location defined in this notification:
If EmpireStateBuilding.ContainsCoordinate(MobileLocation1.Latitude, MobileLocation1.Longitude) Then
MessageBox("You're close to the Empire State Building!")
End If
Notes
A LocationNotification is received by the NotificationReceived event.
The geographic region of a LocationNotification is defined as a circular area Radius meters from the Latitude and Longitude specified.
Compatibility
iOS projects on the iOS operating system.
See also
Notification parent class; Notification class, NotificationReceived event.