Starting the System Camera
Overview
This sample shows how to start the system camera to take a photo and return it to the app.
Preview

How to Use
-
Touch the Photo button to start the system camera. Take a photo.
-
Touch OK to return to the app. The app displays the photo.
Project Directory
├──entry/src/main/ets
│ ├──common
│ │ └──constants
│ │ └──CommonConstants.ets // Common constants
│ ├──entryability
│ │ └──EntryAbility.ets // Entry ability
│ └──pages
│ └──MainPage.ets // Main page
└──entry/src/main/resources // Static resources
How to Implement
Use cameraPicker to start the system camera.
Required Permissions
N/A
Dependencies
N/A
Constraints
-
The sample app is supported only on Bar phone running the standard system.
-
The HarmonyOS version must be HarmonyOS 5.0.5 Release or later.
-
The DevEco Studio version must be DevEco Studio 5.0.5 Release or later.
-
The HarmonyOS SDK version must be HarmonyOS 5.0.5 Release SDK or later.