Support integrating with C/C++ in plugin framework
Problem
It would be nice to have an example of calling C/C++ code, or at least how to build native code along with a Flutter app. This may purely a Gradle question, but its not clear to someone that's not an expert on Gradle (for example, me), how to pull this off. --- Admin comment: Please see https://github.com/dart-lang/sdk/issues/34452 for current status and additional information
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Support integrating with C/C++ in plugin framework
We have heard this requirement from a couple of Google apps: - One such app wrote their own C++ libraries for operating the camera to reduce latency. These libraries are platform specific and optimized to work as quickly as possible. Invoking these libraries with the lowest possible latency is critical for such apps. Forcing them to go through PlatformChannel + JNI will not achieve that on Androi
Trust Score
9 verifications
- 1
We have heard this requirement from a couple of Google apps:
We have heard this requirement from a couple of Google apps:
- 2
One such app wrote their own C++ libraries for operating the camera to reduce la
- One such app wrote their own C++ libraries for operating the camera to reduce latency. These libraries are platform specific and optimized to work as quickly as possible. Invoking these libraries with the lowest possible latency is critical for such apps. Forcing them to go through PlatformChannel + JNI will not achieve that on Android.
- 3
There are advanced mobile teams out there who write business logic components in
- There are advanced mobile teams out there who write business logic components in C++ to be able to share it between their Android and iOS implementations. Flutter supporting direct integration with those libraries would further cement its position of being the best cross-platform framework out there.
- 4
I don't think this is a _must have_. However, this is one area that Flutter can
I don't think this is a _must have_. However, this is one area that Flutter can further differentiate itself from other cross-platform solutions.
Validation
Resolved in flutter/flutter GitHub issue #7053. Community reactions: 125 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep