Not running Background function

@sakina @patrick_dm @JustCodeNinja
I want to run a periodic function even in background also when app minimize(not kill).
I am using dependency android_alarm_manager_plus: ^1.0.2,

getting this warning
Tried to automatically register plugins with FlutterEngine (io.flutter.embedding.engine.FlutterEngine@a611c9b) but could not find and invoke the GeneratedPluginRegistrant

but it’s not working. can you guys help?
Here pasting code below:-
callback function which is printHello() not called.

Future<void> beforePrintHello() async {
    print("Line253");
    final int helloAlarmID = 0;
    print("Line255");
    await AndroidAlarmManager.initialize();
    print("Line257");
    await AndroidAlarmManager.periodic(
      const Duration(seconds: 3),
      helloAlarmID,
      printHello,
    );
  }
void printHello() {
    print("Line246");
    final DateTime now = DateTime.now();
    final int isolateId = Isolate.current.hashCode;
    print(
        "Line240 [$now] Hello, world! isolate=${isolateId} function='$printHello'");
  }