Skip to content
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

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

rahulmaindargi
Copy link

This fix working for me at least. Please review.

#75

@mannprerak2
Copy link
Owner

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.

@rahulmaindargi
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants