ricnaaru / adv_camera

Advanced Camera for Flutter
BSD 3-Clause "New" or "Revised" License
54 stars 35 forks source link

Android Tablet default rotation is -90 and flashlight settings does not work, iPadOS 13.6 issues #35

Open CellCS opened 4 years ago

CellCS commented 4 years ago

Flutter 1.20.2 • channel beta • https://github.com/flutter/flutter.git Framework • revision bbfbf1770c (6 days ago) • 2020-08-13 08:33:09 -0700 Engine • revision 9d5b21729f Tools • Dart 2.9.1

Testing Details
Test device Lenovo Tablet TB-X605F
Android version 8.1.0
Testing condition 1 use adv_camera repository
Testing condition 2 flutter create new project, and using camera.dart from adv_camera repository
Testing Result 1 photo rotation and image live view is -90 compared with object
Testing Result 2 Flashlight setting does not work, and show flowing msg
I/flutter (29282): setPictureSize => true
E/MethodChannel#plugins.flutter.io/adv_camera/0(29282): Failed to handle method call
E/MethodChannel#plugins.flutter.io/adv_camera/0(29282): java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.List.contains(java.lang.Object)' on a null object reference
E/MethodChannel#plugins.flutter.io/adv_camera/0(29282):         at com.ric.adv_camera.AdvCamera.translateFlashType(AdvCamera.java:507)
E/MethodChannel#plugins.flutter.io/adv_camera/0(29282):         at com.ric.adv_camera.AdvCamera.onMethodCall(AdvCamera.java:383)
E/MethodChannel#plugins.flutter.io/adv_camera/0(29282):         at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:230)
E/MethodChannel#plugins.flutter.io/adv_camera/0(29282):         at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)
E/MethodChannel#plugins.flutter.io/adv_camera/0(29282):         at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:692)
E/MethodChannel#plugins.flutter.io/adv_camera/0(29282):         at android.os.MessageQueue.nativePollOnce(Native Method)
E/MethodChannel#plugins.flutter.io/adv_camera/0(29282):         at android.os.MessageQueue.next(MessageQueue.java:325)
E/MethodChannel#plugins.flutter.io/adv_camera/0(29282):         at android.os.Looper.loop(Looper.java:142)
E/MethodChannel#plugins.flutter.io/adv_camera/0(29282):         at android.app.ActivityThread.main(ActivityThread.java:6518)
E/MethodChannel#plugins.flutter.io/adv_camera/0(29282):         at java.lang.reflect.Method.invoke(Native Method)
E/MethodChannel#plugins.flutter.io/adv_camera/0(29282):         at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
E/MethodChannel#plugins.flutter.io/adv_camera/0(29282):         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
E/flutter (29282): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: PlatformException(error, Attempt to invoke interface method 'boolean java.util.List.contains(java.lang.Object)' on a null object reference, null)
Testing Details
Test device iPad
os version ipadOS 13.6
Testing Result-1 Crash/Stop when call call camera.dart.
console log for result-1 shows "Lost connection to device."
result-1 Solved by add NSPhotoLibraryUsageDescription in info.plist
Testing Result-2 No image live view and size list. no spin busy or black view at initial status, show following msg:
no image live view the same issue #23

Runner[2226:4625844] [VERBOSE-2:platform_view_layer.cc(40)] Trying to embed a platform view but the PaintContext does not support embedding

Thanks, I am also still doublechecking the condition. Thanks

ricnaaru commented 3 years ago

for this Runner[2226:4625844] [VERBOSE-2:platform_view_layer.cc(40)] Trying to embed a platform view but the PaintContext does not support embedding error have you added the following key?

<key>io.flutter.embedded_views_preview</key>
<true/>

for this Flashlight setting does not work, and show flowing msg error, could you provide your script?

as for photo rotation and image live view is -90 compared with object error, Android is very complicated when it comes to rotation, since i dont have the specific device, i can sit down and debug it with you if you'd like, just email me if you're available