Interface (MacroQuery)
MacroQuery provides the API to check the support for macro photography.
NOTE
- The initial APIs of this module are supported since API version 10. Newly added APIs will be marked with a superscript to indicate their earliest API version.
- The initial APIs of this interface are supported since API version 19.
Modules to Import
import { camera } from '@kit.CameraKit';
isMacroSupported19+
isMacroSupported(): boolean
Checks whether macro photography is supported in the current state. This API must be called after commitConfig.
Atomic service API: This API can be used in atomic services since API version 19.
System capability: SystemCapability.Multimedia.Camera.Core
Return value
| Type | Description |
|---|---|
| boolean | Check result for the support of macro photography. true if supported, false otherwise. |
Example
function isMacroSupported(photoSession: camera.PhotoSession): boolean {
let isSupported: boolean = photoSession.isMacroSupported();
return isSupported;
}
你可能感兴趣的鸿蒙文章
openharmony 鸿蒙 capi-oh-camera-capturesession-callbacks
openharmony 鸿蒙 arkts-apis-camera-OIS
openharmony 鸿蒙 capi-oh-camera-camera-devicequeryinfo
openharmony 鸿蒙 capi-oh-camera-camera-frameraterange
openharmony 鸿蒙 capi-oh-camera-camera-outputcapability
openharmony 鸿蒙 arkts-apis-camera-Photo
openharmony 鸿蒙 capi-oh-camera-camera-profile
openharmony 鸿蒙 capi-oh-camera-camera-manager