google_ml_kit_flutter icon indicating copy to clipboard operation
google_ml_kit_flutter copied to clipboard

Detection stops when the screen orientation is changed.

Open yamamotokotaro opened this issue 1 year ago • 3 comments

Title: Detection stops when the screen orientation is changed.

Describe the bug When running the example app on iOS, object detection stops when the screen orientation is changed. On Android, the detection continues without any problem.

To Reproduce Steps to reproduce the behavior:

  1. Tap 'Vision APIs' and go to 'Object Detection' in example app.
  2. Change screen orientation

Expected behavior Object detection stops and the last detection result continues to be displayed

Screenshots スクリーンショット 2024-03-30 21 44 17

Platform (please complete the following information):

  • OS: iOS
  • Device: iPhone 15 pro max
  • OS: iOS 17.3.1
  • Flutte Versionr: 3.16.6
  • Plugin version: 0.11.0

Additional context I added the orientation to VisionImage in the plugin's Object-C file, but the symptoms did not improve! It seems that even if I change the screen orientation, the image byte data is still sent to the plugin's Object-C function, and the same detection results continue to be returned.

NSLog(@"metadataRotation: %@", metadata[@"rotation"]);
    if (rotation.intValue == 180) {
        visionImage.orientation = UIImageOrientationRight;
    } else {
        visionImage.orientation = UIImageOrientationUp;
    }

yamamotokotaro avatar Mar 30 '24 12:03 yamamotokotaro

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] avatar Oct 07 '24 19:10 github-actions[bot]

I have the same problem. Can still be reproduced with your example app.

Limatationz avatar Nov 20 '24 14:11 Limatationz

the same issue i also faced ..any update on this issue

askaralic avatar Mar 15 '25 08:03 askaralic