Flutter Usage Example

Step:

  1. Add dependencies to android/app/build.gradle (select what you need)

1dependencies {
2  implementation files('libs/IminLibs1.0.15.jar')
3  implementation files('libs/iminPrinterSDK.jar') //iminPrinter
4}
  1. Create a new directory libs under android/app, and put the Android jar package you need into it;

  2. Copy the android/app/src/jniLibs directory in the demo to the corresponding location in the project;

  3. MainActivity sets the receiving command parameters, see android/app/src/main/java/com.example.flutter_printer_sdk/MainActivity.java in the demo;

  4. Set the send/receive commands in the flutter project, see lib/main.dart in the demo

1const MethodChannel channel = MethodChannel('com.imin.printersdk');
2var s = await channel.invokeMethod("sdkInit");
  1. For the specific usage process and commands, please refer to the official development documentation of the corresponding SDK

Demo: sdk_flutter_usage.zip