-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for Tried to send a platform message to Flutter, but FlutterJNI was detached from native C++. Could not send. Channel: nearby_connections. Response ID: 4 #79
base: master
Are you sure you want to change the base?
Conversation
…r, but FlutterJNI was detached from native C++. Could not send. Channel: nearby_connections. Response ID: 4 Refer from. https://medium.com/@gauravpaudel2013/tried-to-send-a-platform-message-to-flutter-but-flutterjni-was-detached-from-native-c-well-well-c7d9ccf0df96
…r, but FlutterJNI was detached from native C++. Could not send. Channel: nearby_connections. Response ID: 4 Refer from. https://medium.com/@gauravpaudel2013/tried-to-send-a-platform-message-to-flutter-but-flutterjni-was-detached-from-native-c-well-well-c7d9ccf0df96
…r, but FlutterJNI was detached from native C++. Could not send. Channel: nearby_connections. Response ID: 4 Refer from. https://medium.com/@gauravpaudel2013/tried-to-send-a-platform-message-to-flutter-but-flutterjni-was-detached-from-native-c-well-well-c7d9ccf0df96
…r, but FlutterJNI was detached from native C++. Could not send. Channel: nearby_connections. Response ID: 4 Refer from. https://medium.com/@gauravpaudel2013/tried-to-send-a-platform-message-to-flutter-but-flutterjni-was-detached-from-native-c-well-well-c7d9ccf0df96
…r, but FlutterJNI was detached from native C++. Could not send. Channel: nearby_connections. Response ID: 4 Refer from. https://medium.com/@gauravpaudel2013/tried-to-send-a-platform-message-to-flutter-but-flutterjni-was-detached-from-native-c-well-well-c7d9ccf0df96
…r, but FlutterJNI was detached from native C++. Could not send. Channel: nearby_connections. Response ID: 4 Refer from. https://medium.com/@gauravpaudel2013/tried-to-send-a-platform-message-to-flutter-but-flutterjni-was-detached-from-native-c-well-well-c7d9ccf0df96
…r, but FlutterJNI was detached from native C++. Could not send. Channel: nearby_connections. Response ID: 4 Refer from. https://medium.com/@gauravpaudel2013/tried-to-send-a-platform-message-to-flutter-but-flutterjni-was-detached-from-native-c-well-well-c7d9ccf0df96
…r, but FlutterJNI was detached from native C++. Could not send. Channel: nearby_connections. Response ID: 4 Refer from. https://medium.com/@gauravpaudel2013/tried-to-send-a-platform-message-to-flutter-but-flutterjni-was-detached-from-native-c-well-well-c7d9ccf0df96
…r, but FlutterJNI was detached from native C++. Could not send. Channel: nearby_connections. Response ID: 4 Refer from. https://medium.com/@gauravpaudel2013/tried-to-send-a-platform-message-to-flutter-but-flutterjni-was-detached-from-native-c-well-well-c7d9ccf0df96
…r, but FlutterJNI was detached from native C++. Could not send. Channel: nearby_connections. Response ID: 4 Refer from. https://medium.com/@gauravpaudel2013/tried-to-send-a-platform-message-to-flutter-but-flutterjni-was-detached-from-native-c-well-well-c7d9ccf0df96
…r, but FlutterJNI was detached from native C++. Could not send. Channel: nearby_connections. Response ID: 4 Refer from. https://medium.com/@gauravpaudel2013/tried-to-send-a-platform-message-to-flutter-but-flutterjni-was-detached-from-native-c-well-well-c7d9ccf0df96
…r, but FlutterJNI was detached from native C++. Could not send. Channel: nearby_connections. Response ID: 4 Refer from. https://medium.com/@gauravpaudel2013/tried-to-send-a-platform-message-to-flutter-but-flutterjni-was-detached-from-native-c-well-well-c7d9ccf0df96
I don't think changing the method channel to an event channel makes any difference. Although i see you added some flutterJNI stuff to the java code (onAttach and onDetach), maybe that's what made the difference. Can you try once without changing the method channel, but keeping the flutterJNI stuff? Maybe that works. |
flutterJNI stuff didn't work at all, so i commented and then removed. The event channel code works flawlessly in my set up. I think event channel makes sense as 'endpoint found', connection initiated, payload received are events which are originated on native side by android nearby api.. and weekly wnat to send those events to flutter dart code. |
This fix working for me at least. Please review.
#75