PivoAndroid class
The Android implementation of PivoPlatform
.
- Inheritance
-
- Object
- PlatformInterface
- PivoPlatform
- PivoAndroid
Constructors
Properties
-
batteryLevelStream
→ Stream<
int?> -
This function is used to listen to Pivo battery level changes.
no setteroverride
- batteryReadingChannel → EventChannel
-
The event channel used to interact with the native platform,
reads the battery level.
final
- connectionStatusReadingChannel → EventChannel
-
The event channel used to interact with the native platform,
reads connection status events.
final
-
connectionStatusStream
→ Stream<
PivoConnectionStatusEvent?> -
This Stream is used to listen to changes in Pivo connection state.
no setteroverride
-
devicesFound
→ Set<
PivoDevice> -
Used to add the devices found by the platform.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
isScanning
→ Future<
bool> -
Checks if it's currently scanning for Pivo devices.
no setteroverride
- isScanningChannel → EventChannel
-
The event channel used to interact with the native platform,
reads connection status events.
final
-
isScanningStream
→ Stream<
bool> -
Checks if it's currently scanning for Pivo devices.
no setteroverride
- methodChannel → MethodChannel
-
The method channel used to interact with the native platform.
final
- pivoScanReadingChannel → EventChannel
-
The event channel used to interact with the native platform,
reads found pivo devices.
final
-
remoteControlEventStream
→ Stream<
PivoRCEvent> -
This Stream is used to listen to Pivo remote control events.
no setteroverride
- remoteControlReadingChannel → EventChannel
-
The event channel used to interact with the native platform,
reads remote control events.
final
- rotationReadingChannel → EventChannel
-
The event channel used to interact with the native platform,
reads rotation events.
final
-
rotationStream
→ Stream<
PivoRotationEvent?> -
This Stream is used to listen to changes in Pivo rotation state.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
scanResults
→ Stream<
List< PivoDevice> > -
Stream of Pivo devices found during scanning.
no setteroverride
Methods
-
changeName(
String name) → Future< void> -
This function is used to change Pivo name.
override
-
connect(
PivoDevice device) → Future< PivoConnectionStatusEvent> -
Connect to a Pivo device through the
PivoDevice.address
andPivoDevice.name
in Android.override -
disconnect(
) → Future< void> -
Disconnect to the connected Pivo device.
If no Pivo device is connected, this function will do nothing.
override
-
getMacAddress(
) → Future< String?> -
This method is used to get mac address of the Pivo.
It returns bluetooth mac address of the Pivo device
if the Pivo version is above 5 or equal.
override
-
getSupportedSpeedsByRemoteInSecondsPerRound(
int speedInSecondsPerRound) → Future< List< int> ?> -
This function is used to get all supported speeds using remote controller.
override
-
getSupportedSpeedsInSecondsPerRound(
) → Future< List< int> ?> -
This function is used to get all supported speeds for application.
override
-
getVersion(
) → Future< int?> -
This method is used to get Pivo Version and type.
override
-
isPivoConnected(
) → Future< bool> -
Checks if a Pivo device is connected.
override
-
keepPivoWakeUp(
{required bool wakeUp}) → Future< void> -
This function keeps Pivo wake up while connecting to the app,
true by default
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
requestBatteryLevel(
) → Future< int?> -
This function is used to request Pivo battery level.
override
-
setFastestSpeed(
) → Future< void> -
This function sets Pivo speed to fastest possible speed
override
-
setSpeedBySecondsPerRound(
int speedInSecondsPerRound) → Future< void> -
This function is used to set default
speed with seconds per round for Pivo.
override
-
startScan(
) → Future< void> -
Starts scanning for Pivo devices.
override
-
stop(
) → Future< void> -
This function is used to stop Pivo rotation.
override
-
stopScan(
) → Future< void> -
Stops scanning for Pivo devices.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
turnLeft(
int angle, [int? speed]) → Future< void> -
This function is used to turn Pivo to left.
override
-
turnLeftContinuously(
[int? speed]) → Future< void> -
This function is used to rotate continuously
to left with the current speed.
override
-
turnRight(
int angle, [int? speed]) → Future< void> -
This function is used to turn Pivo to right.
override
-
turnRightContinuously(
[int? speed]) → Future< void> -
This function is used to rotate continuously
to right with the current speed.
override
-
unlockWithLicenseKey(
String key) → Future< void> -
Unlock the SDK with license key.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
registerWith(
) → void -
Registers this class as the default instance of
PivoPlatform