Module com.gluonhq.attach.compass
Package com.gluonhq.attach.compass.impl
Class MobileCompassService
- java.lang.Object
-
- com.gluonhq.attach.compass.impl.MobileCompassService
-
- All Implemented Interfaces:
CompassService
- Direct Known Subclasses:
AndroidCompassService
,IOSCompassService
public abstract class MobileCompassService extends java.lang.Object implements CompassService
-
-
Constructor Summary
Constructors Constructor Description MobileCompassService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getHeading()
Returns the compass heading, represented as a value between 0.0 and 359.99, where 0.0 is north.javafx.beans.property.ReadOnlyDoubleProperty
headingProperty()
A frequently-updated heading of the compass.void
start()
Starts the service.void
stop()
Stops the service.
-
-
-
Method Detail
-
getHeading
public double getHeading()
Description copied from interface:CompassService
Returns the compass heading, represented as a value between 0.0 and 359.99, where 0.0 is north. If there is no heading data available, -1.0 will be returned to represent this error state.- Specified by:
getHeading
in interfaceCompassService
- Returns:
- The current compass heading.
-
headingProperty
public javafx.beans.property.ReadOnlyDoubleProperty headingProperty()
Description copied from interface:CompassService
A frequently-updated heading of the compass.- Specified by:
headingProperty
in interfaceCompassService
- Returns:
- A property containing a frequently-updated compass heading.
-
start
public void start()
Description copied from interface:CompassService
Starts the service.- Specified by:
start
in interfaceCompassService
-
stop
public void stop()
Description copied from interface:CompassService
Stops the service.- Specified by:
stop
in interfaceCompassService
-
-