INNER CODE UNIT · Dart

onAuthorization

transistorsoft/flutter_background_geolocation · lib/models/background_geolocation.dart:1711

  static Subscription onAuthorization(Function(AuthorizationEvent) callback) {
    if (_eventsAuthorization == null) {
      _eventsAuthorization = _eventChannelAuthorization
          .receiveBroadcastStream()
          .map((dynamic event) => AuthorizationEvent(event));
    }
    _registerSubscription(_eventsAuthorization!.listen(callback), callback);
    return Subscription._(() async {
      removeListener(callback);
    });
  }

  /// __(Android only)__ Registers a button-click listener on a [Custom Notification Layout](https://github.com/transistorsoft/flutter_background_geolocation/wiki/Android-Custom-Notification-Layout)
  ///
  /// ![](https://dl.dropbox.com/s/whcb6q1gxxdk9t1/android-foreground-notification-transistor.png?dl=1)
  ///
  /// ℹ️ See also:
  /// - [Android Custom Notification Layout](https://github.com/transistorsoft/flutter_background_geolocation/wiki/Android-Custom-Notification-Layout)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…