diff --git a/build-profile.json5 b/build-profile.json5 index c033ce4278fb0641d84107c3c134047ac487368e..e8de1a3cb6ba71c60762653ebac9cfdc1cfa0132 100644 --- a/build-profile.json5 +++ b/build-profile.json5 @@ -5,7 +5,7 @@ { "name": "default", "signingConfig": "default", - "compatibleSdkVersion": "5.0.0(12)", + "compatibleSdkVersion": "5.0.4(16)", "runtimeOS": "HarmonyOS", } ], diff --git a/entry/src/main/ets/pages/Index.ets b/entry/src/main/ets/pages/Index.ets index 27770c5ba62d73b7a8c8aa9cad20853caad20ce0..4d3d53dc538ba0e9c14dece144a23eac9044b4dd 100644 --- a/entry/src/main/ets/pages/Index.ets +++ b/entry/src/main/ets/pages/Index.ets @@ -17,7 +17,6 @@ import { webview } from '@kit.ArkWeb'; import { common, Want } from '@kit.AbilityKit'; import { BusinessError } from '@kit.BasicServicesKit'; import { distributedDeviceManager } from '@kit.DistributedServiceKit'; -import { promptAction } from '@kit.ArkUI'; import { productViewManager } from '@kit.StoreKit'; import { OriginPage } from './OriginPage'; import { Constants } from '../common/Constants'; @@ -31,7 +30,7 @@ struct Index { @Provide navPathStack: NavPathStack = new NavPathStack(); @StorageProp(Constants.SYSTEM_LANGUAGE_KEY) la: string = '' private controller: WebviewController = new webview.WebviewController(); - private context = getContext(this) as common.UIAbilityContext; + private context = this.getUIContext().getHostContext() as common.UIAbilityContext; private functionsMap: Map void> = new Map(); private bundleName: string = ''; @@ -114,7 +113,7 @@ struct Index { try { let remoteDeviceId = this.getRemoteDeviceId(); if (!remoteDeviceId) { - promptAction.showToast({ + this.getUIContext().getPromptAction().showToast({ message: $r('app.string.not_found_toast'), duration: 2000 })