CommunityToolkit / CommunityToolkit/Maui
[BUG] Cant Start Preview after Stop Preview on Huawei Nova 5T
- Dominant language
- C#
- Stars
- 2.7k
- Forks
- 500
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 7
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Did you read the "Reporting a bug" section on Contributing file?
- [x] I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug
### Current Behavior
Hi all,
Currently using Community Toolkit Camera to develop a camera app. When I Stop Preview camera, it work properly. The issue was when I tried to use the StartCameraPreviewCommand, it didn't restart the camera preview at all. There are no exception occur or any errors captured.
Please refer to the screen recorder below and attached Debug log from VS2022.
[Debug log.txt](https://github.com/user-attachments/files/18208233/Debug.log.txt)
https://github.com/user-attachments/assets/cbb37b5c-8e57-4a1b-8396-80c7ef220985
The code I using is from Microsoft documentation.
https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/views/camera-view?tabs=android
Any help would be appreciated.
### Expected Behavior
Able to restart camera preview after stop
### Steps To Reproduce
1. Open and run solution from the repository
### Link to public reproduction project repository
https://github.com/kwjcode/MobileApp.git
### Environment
```markdown
- Device: Huawei Nova 5T
- OS: EMUI 12
- Android version: 10
- .NET MAUI CommunityToolkit: 9.1.1
- .NET MAUI: 8.0
- .NET CommunityToolkit.Maui.Camera: 1.0.5
```
### Anything else?
_No response_
Contributor guide
Research direction
Start with the linked MobileApp reproduction project and the Camera view documentation for StartCameraPreviewCommand. Reproduce the Stop Preview then StartCameraPreviewCommand sequence on the stated Huawei Nova 5T environment, and consider the issue done when the camera preview restarts without errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, csharp
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100