title: Flutter - start foreground service on boot
body: <p>I'm trying to start a foreground service in flutter upon boot.
  To achieve this I'm using <a href="https://pub.dev/packages/flutter_foreground_plugin" rel="nofollow noreferrer">flutter_foreground_plugin</a>
  I added a BOOT_COMPLETED receiver to the android's app manifest, and the broadcast receiver is being called properly, and I can run code inside it upon boot.
  My problem is really simple - I cannot seem to find the proper name for the  changjoopark.com.flutter_foreground_plugin.FlutterForegroundService plugin to start it via an intent.
  NOTE that the package name of the foreground plugin is of course different from mine.</p>
  <p>Here's the relevant extract from AndroidManifest:</p>
  <pre><code>&lt;receiver android:enabled=&quot;true&quot; android:name=&quot;.ServiceStartup&quot; &gt;
          &lt;intent-filter&gt;
              &lt;action android:name=&quot;android.intent.action.BOOT_COMPLETED&quot; /&gt;
          &lt;/intent-filter&gt;
      &lt;/receiver&gt;
      &lt;service android:enabled=&quot;true&quot; android:name=&quot;changjoopark.com.flutter_foreground_plugin.FlutterForegroundService&quot;/&gt;
  </code></pre>
  <p>And here's the code of Service Startup:</p>
  <pre><code>package com.somecompany.myapp;
  
  import android.content.BroadcastReceiver;
  import android.content.ComponentName;
  import android.content.Context;
  import android.content.Intent;
  import android.os.Handler;
  
  public class ServiceStartup extends BroadcastReceiver {
  
      public void onReceive(final Context context, Intent intent) {
          System.out.println(&quot;&gt;&gt;&gt;&gt;&gt;&gt; In onReceive of ServiceStartup &lt;&lt;&lt;&lt;&lt;&lt;&lt; &quot;);
          Handler h = new Handler();
          h.post(new Runnable() {
              @Override
              public void run() {
                  Intent intent = new Intent(&quot;changjoopark.com.flutter_foreground_plugin.FlutterForegroundService&quot;);
                  intent.setPackage(&quot;changjoopark.com.flutter_foreground_plugin&quot;);
                  context.startForegroundService(intent);
              }
          });
      }
  }
  </code></pre>
  <p>I tried all possible combinations of specifying the package name &amp; component, neither seems to work, for all I get an error in logcat of unable to find component.
  What am I missing? How should I start the service?</p>
  <p>Thanks!</p>