You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This plugin fails when attempting to read the clipboard after switching to another app.
Here is the stacktrace:
E/MethodChannel#flutter_clipboard_manager( 8348): Failed to handle method call
E/MethodChannel#flutter_clipboard_manager( 8348): java.lang.NullPointerException: Attempt to invoke virtual method 'int android.content.ClipData.getItemCount()' on a null object reference
E/MethodChannel#flutter_clipboard_manager( 8348): at com.example.flutter_clipboard_manager.FlutterClipboardManagerPlugin.onMethodCall(FlutterClipboardManagerPlugin.java:49)
E/MethodChannel#flutter_clipboard_manager( 8348): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:233)
E/MethodChannel#flutter_clipboard_manager( 8348): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/MethodChannel#flutter_clipboard_manager( 8348): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:692)
E/MethodChannel#flutter_clipboard_manager( 8348): at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#flutter_clipboard_manager( 8348): at android.os.MessageQueue.next(MessageQueue.java:336)
E/MethodChannel#flutter_clipboard_manager( 8348): at android.os.Looper.loop(Looper.java:174)
E/MethodChannel#flutter_clipboard_manager( 8348): at android.app.ActivityThread.main(ActivityThread.java:7356)
E/MethodChannel#flutter_clipboard_manager( 8348): at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#flutter_clipboard_manager( 8348): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
E/MethodChannel#flutter_clipboard_manager( 8348): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
E/DartMessenger( 8348): Uncaught exception in binary message listener
E/DartMessenger( 8348): java.lang.IllegalStateException: Reply already submitted
E/DartMessenger( 8348): at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:139)
E/DartMessenger( 8348): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:253)
E/DartMessenger( 8348): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/DartMessenger( 8348): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:692)
E/DartMessenger( 8348): at android.os.MessageQueue.nativePollOnce(Native Method)
E/DartMessenger( 8348): at android.os.MessageQueue.next(MessageQueue.java:336)
E/DartMessenger( 8348): at android.os.Looper.loop(Looper.java:174)
E/DartMessenger( 8348): at android.app.ActivityThread.main(ActivityThread.java:7356)
E/DartMessenger( 8348): at java.lang.reflect.Method.invoke(Native Method)
E/DartMessenger( 8348): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
E/DartMessenger( 8348): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Code to reproduce:
Timer.periodic(Duration(seconds:2), (_) async {
final text = await FlutterClipboardManager.copyFromClipBoard();
print('got clipboard data: $text');
});
press go into recent screenpress home button on android so the app will be in the paused state.
The text was updated successfully, but these errors were encountered:
kreativityapps
pushed a commit
to kreativityapps/flutter_clipboard_manager
that referenced
this issue
Mar 8, 2021
This plugin fails when attempting to read the clipboard after switching to another app.
Here is the stacktrace:
Code to reproduce:
press go into recent screenpress home button on android so the app will be in the paused state.
The text was updated successfully, but these errors were encountered: