mirror of
https://gitee.com/openharmony/applications_notes
synced 2024-11-23 07:30:27 +00:00
commit
bb1913cec8
@ -14,7 +14,7 @@
|
||||
*/
|
||||
|
||||
import {LogUtil} from '../baseUtil/LogUtil'
|
||||
import MediaLib from '@ohos.multimedia.mediaLibrary';
|
||||
import photoAccessHelper from '@ohos.file.photoAccessHelper';
|
||||
|
||||
const TAG = "MediaLibraryAccess"
|
||||
export class MediaLibraryAccess {
|
||||
@ -28,7 +28,7 @@ export class MediaLibraryAccess {
|
||||
// 通过Uri拷贝图片到指定指定的包路径下
|
||||
// 1、获取本地路径
|
||||
|
||||
let fileResult = await MediaLib.getMediaLibrary(context).getFileAssets(fetchOpt)
|
||||
let fileResult = await photoAccessHelper.getPhotoAccessHelper(context).getAssets(fetchOpt)
|
||||
if (fileResult != undefined) {
|
||||
album.count = fileResult.getCount();
|
||||
if (album.count <= 0) {
|
||||
|
@ -47,6 +47,9 @@
|
||||
},
|
||||
{
|
||||
"name": "ohos.permission.START_ABILITIES_FROM_BACKGROUND"
|
||||
},
|
||||
{
|
||||
"name": "ohos.permission.READ_IMAGEVIDEO"
|
||||
}
|
||||
],
|
||||
"deliveryWithInstall": true,
|
||||
|
Loading…
Reference in New Issue
Block a user