<h2 dir="auto">Steps to Reproduce</h2>
<p dir="auto">I've forked the geofencing example written by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/bkonyi/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/bkonyi">@bkonyi</a> at <a href="https://github.com/MaikuB/FlutterGeofencing">https://github.com/MaikuB/FlutterGeofencing</a><br>
(edit: apologies, I've deleted the fork but I imagine it's not needed anymore. If it is then let me know) to demonstrate this</p>
<ol dir="auto">
<li>Follow the steps for enabling a plugin to execute headless Dart code as per <a href="https://medium.com/flutter-io/executing-dart-in-the-background-with-flutter-plugins-and-geofencing-2b3e40a1a124" rel="nofollow">https://medium.com/flutter-io/executing-dart-in-the-background-with-flutter-plugins-and-geofencing-2b3e40a1a124</a>. This will involve writing a custom Application class with overrides and a service that have code where a <code class="notranslate">PluginRegistrantCallback</code> will <code class="notranslate">registerWith</code> the plugin registry of a background view (e.g. see <a href="https://github.com/MaikuB/FlutterGeofencing/blob/master/android/src/main/kotlin/io/flutter/plugins/geofencing/GeofencingService.kt">here</a>. This typically involves a "foreground" platform channel (for lack of a better description) and a background platform channel being established.</li>
<li>Add code on the Android platform side that will execute Dart code normally (i.e. the "non-headless" way) using the following <a href="https://docs.flutter.io/javadoc/io/flutter/plugin/common/MethodChannel.html#invokeMethod-java.lang.String-java.lang.Object-" rel="nofollow">channel.invokeMethod(...)</a> and handle the call on the Flutter side. In the forked repository linked above, whenever a geofence is registered, the Android side will call <code class="notranslate">channel.invokeMethod("register", null)</code> (see <a href="https://github.com/MaikuB/FlutterGeofencing/blob/5f171bcc6a01f9cc4d936983437ab7dba56ca20e/android/src/main/kotlin/io/flutter/plugins/geofencing/GeofencingPlugin.kt#L90">here</a>. This caught in the Flutter to call print the name of the method called, which would be "register" in this case (see <a href="https://github.com/MaikuB/FlutterGeofencing/blob/5f171bcc6a01f9cc4d936983437ab7dba56ca20e/lib/src/geofencing.dart#L163">here</a></li>
<li>Run the app and invoke code that execute the logic written in step 2 and notice the Flutter side will catch that a method got called from the platform side. You should <code class="notranslate">method called: register</code> in the debugger output</li>
<li>Now invoke logic that triggers headless execution</li>
<li>Invoke the logic that was done in step 2 again and the Flutter side doesn't get notification a method got called from the platform side i.e. <code class="notranslate">method called: register</code> isn't displayed again</li>
</ol>
<p dir="auto">I noticed this whilst incorporating headless execution into my own plugin for notifications. It seems like once a background service calls <a href="https://docs.flutter.io/javadoc/io/flutter/plugin/common/PluginRegistry.PluginRegistrantCallback.html#registerWith-io.flutter.plugin.common.PluginRegistry-" rel="nofollow">this method</a> that enables headless Dart code to fire code that relies on other plugin, calling <code class="notranslate">invokeMethod</code> on the foreground platform channel no longer works. Am not sure what the solution is here or perhaps there's an issue with the engine itself</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[✓] Flutter (Channel beta, v0.9.4, on Mac OS X 10.14 18A391, locale en-AU)
    • Flutter version 0.9.4 at /Users/michaelbui/flutter
    • Framework revision f37c235c32 (5 weeks ago), 2018-09-25 17:45:40 -0400
    • Engine revision 74625aed32
    • Dart version 2.1.0-dev.5.0.flutter-a2eb050044

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /Users/michaelbui/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 27.0.3
    • ANDROID_HOME = /Users/michaelbui/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    • ios-deploy 1.9.2
    • CocoaPods version 1.5.0

[✓] Android Studio (version 3.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 27.1.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[✓] IntelliJ IDEA Community Edition (version 2017.3.5)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 23.0.2
    • Dart plugin version 173.4700

[✓] VS Code (version 1.28.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 2.20.0

[✓] Connected devices (1 available)
    • Pixel 2 XL • 711KPXV0530842 • android-arm64 • Android 9 (API 28)

• No issues found!"><pre class="notranslate"><code class="notranslate">[✓] Flutter (Channel beta, v0.9.4, on Mac OS X 10.14 18A391, locale en-AU)
    • Flutter version 0.9.4 at /Users/michaelbui/flutter
    • Framework revision f37c235c32 (5 weeks ago), 2018-09-25 17:45:40 -0400
    • Engine revision 74625aed32
    • Dart version 2.1.0-dev.5.0.flutter-a2eb050044

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /Users/michaelbui/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 27.0.3
    • ANDROID_HOME = /Users/michaelbui/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    • ios-deploy 1.9.2
    • CocoaPods version 1.5.0

[✓] Android Studio (version 3.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 27.1.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[✓] IntelliJ IDEA Community Edition (version 2017.3.5)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 23.0.2
    • Dart plugin version 173.4700

[✓] VS Code (version 1.28.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 2.20.0

[✓] Connected devices (1 available)
    • Pixel 2 XL • 711KPXV0530842 • android-arm64 • Android 9 (API 28)

• No issues found!
</code></pre></div>
<p dir="auto">Attempting to use a plugin in the context of a background isolate spawned by another plugin will cause failures when making calls over method channels. On Android, the <code class="notranslate">PluginRegistrant</code> interface is used to allow for plugins to register the application's plugins with a <code class="notranslate">FlutterNativeView</code> but no equivalent is available on iOS.</p>