Module com.gluonhq.attach.position
Package com.gluonhq.attach.position.impl
Class IOSPositionService
java.lang.Object
com.gluonhq.attach.position.impl.IOSPositionService
- All Implemented Interfaces:
PositionService
An implementation of the
PositionService for the
iOS platform.
Important note: it requires adding to the info.plist file:
<key>NSLocationUsageDescription</key>
<string>Reason to use Location Service (iOS 6+)</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Reason to use Location Service (iOS 8+)</string>
With Background mode enabled
<key>UIBackgroundModes</key>
<array>
<string>location</string>
</array>
<key>NSLocationUsageDescription</key>
<string>Reason to use Location Service (iOS 6+)</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>Reason to use Location Service (iOS 8+) in background</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Reason to use Location Service (iOS 8+) in background</string>
-
Property Summary
Properties -
Field Summary
Fields inherited from interface com.gluonhq.attach.position.PositionService
DEFAULT_PARAMETERS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the value of the property position.javafx.beans.property.ReadOnlyObjectProperty<Position>A read-only property containing information about the device's current location on earth.voidstart()Starts the service withPositionService.DEFAULT_PARAMETERS.voidstart(Parameters parameters) Starts the service.voidstop()Stops the service.
-
Property Details
-
position
- Specified by:
positionPropertyin interfacePositionService- Returns:
- a read-only object property containing the device's current location
- See Also:
-
-
Constructor Details
-
IOSPositionService
public IOSPositionService()
-
-
Method Details
-
start
public void start()Description copied from interface:PositionServiceStarts the service withPositionService.DEFAULT_PARAMETERS. Developer must call either this method orPositionService.start(com.gluonhq.attach.position.Parameters)to start the service- Specified by:
startin interfacePositionService
-
start
Description copied from interface:PositionServiceStarts the service. Developer must call either this method orPositionService.start()to start the service- Specified by:
startin interfacePositionService- Parameters:
parameters- Parameters for configuring the service, including desired accuracy, minimum distance and time interval between notifications, or background mode
-
stop
public void stop()Description copied from interface:PositionServiceStops the service. Developer may call this method to stop the service on demand- Specified by:
stopin interfacePositionService
-
positionProperty
Description copied from interface:PositionServiceA read-only property containing information about the device's current location on earth. The property can contain anullobject when the position of the device could be determined.- Specified by:
positionPropertyin interfacePositionService- Returns:
- a read-only object property containing the device's current location
- See Also:
-
getPosition
Gets the value of the property position.- Specified by:
getPositionin interfacePositionService- Property description:
- Returns:
- the current position of the device
-