Levi-Lesches/opencv_camera

is android support WIP

Opened this issue · 2 comments

is there a plan to extend it to android?

Responding from Levi-Lesches/opencv_ffi#8:

The underlying FFI package, opencv_ffi, does support any platform (with just a few more lines to find the compiled libraries), but the hard part is integrating with Flutter's build system. I haven't even started this process on Android yet, but on Windows, for example, that would be done in windows/CMakeLists.txt.

Right now my focus is on the underlying FFI package as my use-case is a non-Flutter app running on a Raspberry Pi, but I am very open to PRs or help integrating with Flutter and testing. The plan for the FFI package is to use the Native Assets feature in the future, but for now, integrating separately with Flutter's build system is the way to go. That would mean adding the real opencv as a submodule and building it here instead of using opencv_ffi/build

Adding a note here that this package is meant to implement package:camera and be a replacement for it on the desktop platforms. Specifically, this package is a non-endorsed federated plugin. So, if your pubspec looks like this:

dependencies: 
  camera: any
  opencv_camera: any

You should automatically get the right versions based on your platform (this package's pubspec.yaml declares that it does not yet support Android).

The plan is to make an API that matches package:camera, but for now, you can choose which API to use based on Platform.isAndroid. You should still be able to import and compile with this package on Android, you just can't use it until we get the native binaries integrated properly.