Photo
The door lock's album list, alarm list, and log list have the capability to display images. For security reasons, the data provided by Tuya is encrypted, so decryption is required when displaying images.
Install Dependencies
Please add IPCKit to the developer IDE, and version requirement of IPCKit: 6.4.5 or higher
Decrypt and Download Image
Use the API downloadEncryptionImage to decrypt the image and download it to the App cache
Implementation in ray
Rotate Image
Since the lock's camera may be rotated, the image needs to be rotated accordingly.
Get rotation angle
To process image dimensions, first get the actual dimensions of the image through getImageInfo, then calculate the actual display dimensions of the image by combining the maximum display size and rotation angle.