enableConnectionService method
Enables or disables ConnectionService at runtime (Android only).
Invokes the native 'enableConnectionService' method via MethodChannel. On iOS, this is a no-op.
Returns 0 on success, -1 on failure.
Implementation
@override
Future<int> enableConnectionService({required bool enabled}) async {
final args = {'enabled': enabled};
_logCall('enableConnectionService', args);
try {
final result = await methodChannel.invokeMethod<int>('enableConnectionService', args);
_logResponse('enableConnectionService', result);
return result ?? -1;
} on PlatformException catch (e) {
_logError('enableConnectionService', e);
return -1;
}
}