flutter_background
flutter_background copied to clipboard
Failed to handle method call
my code:

version: 0.1.6
issue
E/MethodChannel#flutter_background( 9919): Failed to handle method call
E/MethodChannel#flutter_background( 9919): kotlin.KotlinNullPointerException
E/MethodChannel#flutter_background( 9919): at de.julianassmann.flutter_background.FlutterBackgroundPlugin.onMethodCall(FlutterBackgroundPlugin.kt:67)
E/MethodChannel#flutter_background( 9919): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:230)
E/MethodChannel#flutter_background( 9919): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/MethodChannel#flutter_background( 9919): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:692)
E/MethodChannel#flutter_background( 9919): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#flutter_background( 9919): at android.os.MessageQueue.next(MessageQueue.java:335)
E/MethodChannel#flutter_background( 9919): at android.os.Looper.loop(Looper.java:183)
E/MethodChannel#flutter_background( 9919): at android.app.ActivityThread.main(ActivityThread.java:7697)
E/MethodChannel#flutter_background( 9919): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter_background( 9919): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/MethodChannel#flutter_background( 9919): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952)
E/flutter ( 9919): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: PlatformException(error, null, null)
E/flutter ( 9919): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:572:7)
E/flutter ( 9919): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:161:18)
E/flutter ( 9919):
same error, any update?
I think this is related to #69
I'd try the solution by @jakoss to add the service to the AndroidManifset manually
<service android:name="de.julianassmann.flutter_background.IsolateHolderService" android:exported="false" />
I added still no notification icon
I added still no notification icon
Are you on Android 13?
Thanks for creating the issue. Can you please upgrade to the new version of the plugin (1.3.0), update your AndroidManifest.xml according to the new README (specifically including the foreground service types) and report back?