title: Flutter Alarm Manager Missing Plugin Exception
body: <p>I'm having trouble setting up a daily task to complete certain functions. I've managed to get android_alarm_manager to work, I currently, have it set to print a message in the log every minute for testing purposes but will have it set daily when finished. Below is my code:</p>
  <pre><code>void printHello() async{
    final DateTime now = DateTime.now();
    final int isolateId = Isolate.current.hashCode;
    print(&quot;[$now] Hello, world! isolate=${isolateId} function='$printHello'&quot;);
  
    int myValue = await getData();
  
    print(&quot;Test Value: $myValue&quot;);
  }
  
  Future&lt;int&gt; getData() async{
    SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
  
    return sharedPreferences.getInt(&quot;testInt&quot;);
  }
  
  main() async {
    WidgetsFlutterBinding.ensureInitialized();
    final int helloAlarmID = 0;
    await AndroidAlarmManager.initialize();
    runApp(MyApp());
    await AndroidAlarmManager.periodic(const Duration(minutes: 1), helloAlarmID, printHello);
  }
  </code></pre>
  <p>When the alarm fires I get the working print message like in the example and the error like this</p>
  <pre><code>I/flutter (22910): [2019-12-21 13:34:09.526343] Hello, world! isolate=957159586 function='Closure: () =&gt; void from Function 'printHello': static.'
  E/flutter (22910): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/shared_preferences)
  E/flutter (22910): #0      getData (package:my_jungle_2/main.dart:34:41)
  E/flutter (22910): &lt;asynchronous suspension&gt;
  E/flutter (22910): #1      printHello (package:my_jungle_2/main.dart:28:23)
  E/flutter (22910): #2      _alarmManagerCallbackDispatcher.&lt;anonymous closure&gt; (package:android_alarm_manager/android_alarm_manager.dart:43:14)
  E/flutter (22910): #3      MethodChannel._handleAsMethodCall (package:flutter/src/services/platform_channel.dart:402:55)
  E/flutter (22910): #4      MethodChannel.setMethodCallHandler.&lt;anonymous closure&gt; (package:flutter/src/services/platform_channel.dart:370:54)
  E/flutter (22910): #5      _DefaultBinaryMessenger.handlePlatformMessage (package:flutter/src/services/binding.dart:200:33)
  E/flutter (22910): #6      _invoke3.&lt;anonymous closure&gt; (dart:ui/hooks.dart:303:15)
  E/flutter (22910): #7      _rootRun (dart:async/zone.dart:1126:13)
  E/flutter (22910): #8      _CustomZone.run (dart:async/zone.dart:1023:19)
  E/flutter (22910): #9      _CustomZone.runGuarded (dart:async/zone.dart:925:7)
  E/flutter (22910): #10     _invoke3 (dart:ui/hooks.dart:302:10)
  E/flutter (22910): #11     _dispatchPlatformMessage (dart:ui/hooks.dart:162:5)
  </code></pre>
  <p>I am still a novice at Android and Flutter and am struggling to understand how I give the alarm manager the plugins I need to use.</p>
  <p>Are you even able to give the Alarm Manager plugins like Shared Preferences?</p>
  <p>Thank you in advance for any help in clearing this up for me. Apologies if I haven't understood how the alarm manager is meant to work correctly.</p>