Closed rajeshsws closed 11 months ago
Firebase.Core.resources/GoogleUtilitiesComponents.xcframework/ios-arm64/GoogleUtilitiesComponents.framework/GoogleUtilitiesComponents : warning MT7091: The framework C:\Users\shoky.nuget\packages\xamarin.firebase.ios.core\8.10.0.3\lib\net6.0-ios15.4\Firebase.Core.resources\GoogleUtilitiesComponents.xcframework\ios-arm64\GoogleUtilitiesComponents.framework is a framework of static libraries, and will not be copied to the app. 1>C:/Users/shoky/AppData/Local/XamarinBuildDownloadCache/MLKBarcode-1.6.0/Frameworks/MLKitBarcodeScanning.framework/MLKitBarcodeScanning : warning MT7091: The framework C:\Users\shoky\AppData\Local\XamarinBuildDownloadCache\MLKBarcode-1.6.0\Frameworks\MLKitBarcodeScanning.framework is a framework of static libraries, and will not be copied to the app. 1>C:/Users/shoky/AppData/Local/XamarinBuildDownloadCache/MLKMDD-3.0.0/Frameworks/MLKitMDD.framework/MLKitMDD : warning MT7091: The framework C:\Users\shoky\AppData\Local\XamarinBuildDownloadCache\MLKMDD-3.0.0\Frameworks\MLKitMDD.framework is a framework of static libraries, and will not be copied to the app. 1>C:/Users/shoky/AppData/Local/XamarinBuildDownloadCache/MLKVision-3.0.0/Frameworks/MLKitVision.framework/MLKitVision : warning MT7091: The framework C:\Users\shoky\AppData\Local\XamarinBuildDownloadCache\MLKVision-3.0.0\Frameworks\MLKitVision.framework is a framework of static libraries, and will not be copied to the app. 1>C:/Users/shoky/AppData/Local/XamarinBuildDownloadCache/MLImg-1.0.0beta2/Frameworks/MLImage.framework/MLImage : warning MT7091: The framework C:\Users\shoky\AppData\Local\XamarinBuildDownloadCache\MLImg-1.0.0beta2\Frameworks\MLImage.framework is a framework of static libraries, and will not be copied to the app. 1>C:/Users/shoky/AppData/Local/XamarinBuildDownloadCache/MLKCore-5.0.0/Frameworks/MLKitCommon.framework/MLKitCommon : warning MT7091: The framework C:\Users\shoky\AppData\Local\XamarinBuildDownloadCache\MLKCore-5.0.0\Frameworks\MLKitCommon.framework is a framework of static libraries, and will not be copied to the app. 1>C:/Users/shoky/AppData/Local/XamarinBuildDownloadCache/GAppM-8.9.1/GoogleAppMeasurement-8.9.1/Frameworks/GoogleAppMeasurement.xcframework/ios-arm64_armv7/GoogleAppMeasurement.framework/GoogleAppMeasurement : warning MT7091: The framework C:\Users\shoky\AppData\Local\XamarinBuildDownloadCache\GAppM-8.9.1\GoogleAppMeasurement-8.9.1\Frameworks\GoogleAppMeasurement.xcframework\ios-arm64_armv7\GoogleAppMeasurement.framework is a framework of static libraries, and will not be copied to the app. 1>C:/Users/shoky/AppData/Local/XamarinBuildDownloadCache/MLKBarcode-1.6.0/Frameworks/MLKitBarcodeScanning.framework/MLKitBarcodeScanning : warning MT7091: The framework C:\Users\shoky\AppData\Local\XamarinBuildDownloadCache\MLKBarcode-1.6.0\Frameworks\MLKitBarcodeScanning.framework is a framework of static libraries, and will not be copied to the app. 1>C:/Users/shoky/AppData/Local/XamarinBuildDownloadCache/MLKMDD-3.0.0/Frameworks/MLKitMDD.framework/MLKitMDD : warning MT7091: The framework C:\Users\shoky\AppData\Local\XamarinBuildDownloadCache\MLKMDD-3.0.0\Frameworks\MLKitMDD.framework is a framework of static libraries, and will not be copied to the app. 1>C:/Users/shoky/AppData/Local/XamarinBuildDownloadCache/MLKVision-3.0.0/Frameworks/MLKitVision.framework/MLKitVision : warning MT7091: The framework C:\Users\shoky\AppData\Local\XamarinBuildDownloadCache\MLKVision-3.0.0\Frameworks\MLKitVision.framework is a framework of static libraries, and will not be copied to the app. 1>C:/Users/shoky/AppData/Local/XamarinBuildDownloadCache/MLImg-1.0.0beta2/Frameworks/MLImage.framework/MLImage : warning MT7091: The framework C:\Users\shoky\AppData\Local\XamarinBuildDownloadCache\MLImg-1.0.0beta2\Frameworks\MLImage.framework is a framework of static libraries, and will not be copied to the app. 1>C:/Users/shoky/AppData/Local/XamarinBuildDownloadCache/MLKCore-5.0.0/Frameworks/MLKitCommon.framework/MLKitCommon : warning MT7091: The framework C:\Users\shoky\AppData\Local\XamarinBuildDownloadCache\MLKCore-5.0.0\Frameworks\MLKitCommon.framework is a framework of static libraries, and will not be copied to the app.
[Camera2CameraImpl] {Camera@d7b3fa[id=0]} Unable to open camera due to validateClientPermissionsLocked:1167: Caller "com.companyname.testcam" (PID 10399, UID 7119) cannot open camera "0" without camera permission [Camera2CameraImpl] {Camera@d7b3fa[id=0]} Transitioning camera internal state: OPENING --> REOPENING [CameraStateMachine] New public camera state CameraState{type=OPENING, error=null} from OPENING and null [Camera2CameraImpl] Camera reopening attempted for 10000ms without success. [Camera2CameraImpl] {Camera@d7b3fa[id=0]} Transitioning camera internal state: REOPENING --> PENDING_OPEN
My Problem is solved
My Problem is solved
How was your problem solved? It's generally useful to let others know what the fix is.
Under platform folder, in android main activity, you need to give permission for camera in .net 8, public class MainActivity : MauiAppCompatActivity { protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState);
Task<bool> allowed = BarcodeScanner.Mobile.Methods.AskForRequiredPermission();
}
}
Hope this will resolve your problem
@JimmyPun610 My code was working fine in .NET 7 after converting to .NET 8, camera is not coming. After debugging i found this error.
[Camera2CameraImpl] {Camera@e772f28[id=0]} Cancelling scheduled re-open: androidx.camera.camera2.internal.Camera2CameraImpl$StateCallback$ScheduledReopen@38257a1 [Camera2CameraImpl] {Camera@e772f28[id=0]} Opening camera. [Camera2CameraImpl] {Camera@e772f28[id=0]} Transitioning camera internal state: REOPENING --> OPENING [CameraStateMachine] New public camera state CameraState{type=OPENING, error=null} from OPENING and null [UseCaseAttachState] All use case: [androidx.camera.core.Preview-68f3ec60-8011-42e7-8d23-537ef72376266181736, androidx.camera.core.ImageAnalysis-4335fd4e-fba8-4474-b350-79a70e9ed249146636903] for camera: 0 [CameraManager] Using legacy camera HAL. [Camera2CameraImpl] {Camera@e772f28[id=0]} Unable to open camera due to Lacking privileges to access camera service [Camera2CameraImpl] {Camera@e772f28[id=0]} Transitioning camera internal state: OPENING --> REOPENING [CameraStateMachine] New public camera state CameraState{type=OPENING, error=null} from OPENING and null [Camera2CameraImpl] Camera reopening attempted for 10000ms without success. [Camera2CameraImpl] {Camera@e772f28[id=0]} Transitioning camera internal state: REOPENING --> PENDING_OPEN
Permission is already given in menifest file
Below is my xmal code <?xml version="1.0" encoding="utf-8" ?> <mct:Popup xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
</mct:Popup>
Code behind private void GoogleCamera_OnDetected(object sender, BarcodeScanner.Mobile.OnDetectedEventArg e) {
}