6. SDK Status Updates

You can learn more about the SDK's detection status by querying the getSdkStatus API. Changes to the SDK status are usually influenced by changes to the device state and settings (e.g. airplane mode, location permission, etc). Handling these changes gives you the chance to instruct your user, when applicable, to properly adjust the device setting for optimal SDK detections.

import 'package:sentiance_core/sentiance_core.dart'
    show SentianceCore, DetectionStatus;

final sentiance = SentianceCore();

Future<DetectionStatus> getDetectionStatus() async {
    final sdkStatus = await sentiance.getSdkStatus();
    return sdkStatus.detectionStatus;
}

Last updated