binderFromSystemService method

  1. @override
Future<int?> binderFromSystemService(
  1. String serviceName, {
  2. PrivBinderServiceSource source = PrivBinderServiceSource.currentProcess,
})
override

Resolves serviceName into a handle Dart can inspect.

Returns null when the service is not available from source.

A Binder cannot cross the platform channel, so Dart only gets an integer handle. Issuing the service's own transactions has to happen in Kotlin, the same way a UserService is called.

Implementation

@override
Future<int?> binderFromSystemService(
  String serviceName, {
  PrivBinderServiceSource source = PrivBinderServiceSource.currentProcess,
}) => methodChannel.invokeMethod<int>(
  'binderFromSystemService',
  <String, Object?>{'serviceName': serviceName, 'source': source.wireName},
);