Flutter build with C/C++ code - example?
We do not currently have an example of doing such. To make C++ interop easy, we would want to provide a C API for the HostMessages system, which we do not currently have.
You filed a bug to request such( https://github.com/flutter/flutter/issues/7053) which I have updated with this request.
Joel
Updated on December 01, 2022Comments
-
Joel over 1 year
I'm using the hello_services gradle build to create a service in Java, but what I would really like is to use C/C++ code within my app, initially on Android. I've tried integrating some C code with no success (I end up messing up the flutter build).
I'm looking for an example or information on how to add that in. Ideally, I'd like to call Dart/Flutter flutterView.sendToFlutter() from C code, but JNI works fine as well.
I'm guessing I can add a gradle subproject, any tips/pointers appreciated.