diff --git a/README.md b/README.md index 6e0b5f79a1314d1b778f62935d46368c4f1fe58c..1de218493770ec3a44c470d2e8d42fb8db7ea669 100644 --- a/README.md +++ b/README.md @@ -25,35 +25,6 @@ 4. 本Sample仅提供在本地创建、更新与结束实况窗的能力(不能后台更新,若要后台更新,请使用Push Kit)。若要使用Push Kit更新,可参考[推送实况窗消息服务](https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/push-update-liveview),用已有服务器调用对应的REST API。 -## 工程目录 - -``` -├─entry/src/main/ets -│ ├───constant -│ │ └───Constant.ets // 常量 -│ ├───entryability -│ │ └───EntryAbility.ets // EntryAbility -│ ├───liveview -│ │ ├───LiveViewExtAbility.ets // 实况窗 -│ │ └───LockScreenPage.ets // 锁屏页面 -│ ├───model -│ │ └───RouteDataModel.ets // 导航数据Model -│ ├───pages -│ │ └───Index.ets // 主页面 -│ ├───utils -│ │ ├───BreakpointUtil.ets // 断点工具类 -│ │ ├───LiveView.ets // 实况窗类 -│ │ └───LiveViewUtil.ets // 实况窗工具类 -│ ├───view -│ │ ├───RoadView.ets // 道路 -│ │ ├───TrafficInfoView.ets // 导航信息 -│ │ └───TrafficView.ets // 导航页面 -│ └───viewmodel -│ └───RouteDataViewModel.ets // 导航数据ViewModel -└───entry/src/main/resources - -``` - ## 具体实现 1. HomePage主页面在创建后,创建实况窗和创建定时任务,每间隔固定时间调用liveViewManager.updateLiveView()接口更新实况窗,并通过commonEventManager.publish()接口传递新的参数给沉浸实况窗页面,实现实况窗和沉浸实况窗更新。 diff --git a/liveviewlockscreenlibrary/src/main/ets/pages/LiveViewLockScreenPage.ets b/liveviewlockscreenlibrary/src/main/ets/pages/LiveViewLockScreenPage.ets index c8037306df786f0cb075c5493bf095bbedb9bca8..511d61468fab881fcb3c9abb2faa48894062a3b9 100644 --- a/liveviewlockscreenlibrary/src/main/ets/pages/LiveViewLockScreenPage.ets +++ b/liveviewlockscreenlibrary/src/main/ets/pages/LiveViewLockScreenPage.ets @@ -13,20 +13,87 @@ * limitations under the License. */ -import { promptAction } from '@kit.ArkUI'; +import { hilog } from '@kit.PerformanceAnalysisKit'; import { LiveView } from '../utils/LiveView'; import { TrafficView } from '../view/TrafficView'; +const TAG = '[LiveViewLockScreenPage]'; + +@CustomDialog +struct TipDialog { + public controller?: CustomDialogController; + public onConfirm: () => void = () => { + }; + + build() { + Column() { + Row() { + Text($r('app.string.tip')) + .fontSize(20) + .fontWeight(FontWeight.Bold) + .lineHeight(27) + .fontColor($r('app.color.tip')) + } + .height(56) + .width('100%') + .justifyContent(FlexAlign.Center) + .alignItems(VerticalAlign.Center) + + Text($r('app.string.tip_text')) + .fontSize(16) + .fontWeight(FontWeight.Medium) + .lineHeight(21) + .fontColor($r('app.color.tip')) + + Row() { + Text($r('app.string.tip_get')) + .width('100%') + .height(40) + .fontColor($r('app.color.tip_text')) + .textAlign(TextAlign.Center) + .onClick(() => { + hilog.info(0x0000, TAG, 'Button-clicking callback'); + this.onConfirm(); + }) + } + .height(56) + .width('100%') + .margin({ top: 8 }) + .padding({ left: 16, right: 16 }) + .alignItems(VerticalAlign.Top) + .justifyContent(FlexAlign.Center) + } + .width('100%') + .height('100%') + .alignItems(HorizontalAlign.Center) + .borderRadius(32) + .backgroundColor($r('app.color.tip_background')) + } +} + @Component export struct LiveViewLockScreenPage { + private customDialogController: CustomDialogController = new CustomDialogController({ + builder: TipDialog({ + onConfirm: () => { + this.customDialogController?.close(); + } + }), + cancel: () => { + }, + onWillDismiss: (dismissDialogAction: DismissDialogAction) => { + dismissDialogAction.dismiss() + }, + alignment: DialogAlignment.Center, + autoCancel: true, + cornerRadius: 32, + width: 338, + height: 141 + }); + aboutToAppear(): void { LiveView.getInstance().createLiveView(); - this.getUIContext().getPromptAction().showToast({ - message: $r('app.string.toast'), - duration: 2000, - showMode: promptAction.ToastShowMode.DEFAULT, - bottom: 180 - }); + this.customDialogController?.open(); } build() { @@ -34,9 +101,10 @@ export struct LiveViewLockScreenPage { Image($r('app.media.traffic_background')) .width('110%') .height('110%') + TrafficView() } .width('100%') .height('100%') } -} \ No newline at end of file +} diff --git a/liveviewlockscreenlibrary/src/main/ets/utils/BreakpointSystem.ets b/liveviewlockscreenlibrary/src/main/ets/utils/BreakpointSystem.ets index 67c4df7c1793b4649c2ffa3b4cd3e6b39e138099..8ca8daa4412457146bcbc391579298d2e69930bb 100644 --- a/liveviewlockscreenlibrary/src/main/ets/utils/BreakpointSystem.ets +++ b/liveviewlockscreenlibrary/src/main/ets/utils/BreakpointSystem.ets @@ -83,18 +83,14 @@ export class BreakpointSystem { } public updateCurrentWidthBreakpoint(widthBreakpoint: BreakpointTypeEnum): void { - hilog.info(0x0000, TAG, '%{public}s', `widthBreakpoint 1: ${widthBreakpoint}`); if (this.currentWidthBreakpoint !== widthBreakpoint) { - hilog.info(0x0000, TAG, '%{public}s', `widthBreakpoint 2: ${widthBreakpoint}`); this.currentWidthBreakpoint = widthBreakpoint; AppStorage.setOrCreate('currentWidthBreakpoint', this.currentWidthBreakpoint); } } public updateCurrentHeightBreakpoint(heightBreakpoint: BreakpointTypeEnum): void { - hilog.info(0x0000, TAG, '%{public}s', `heightBreakpoint 1: ${heightBreakpoint}`); if (this.currentHeightBreakpoint !== heightBreakpoint) { - hilog.info(0x0000, TAG, '%{public}s', `heightBreakpoint 2: ${heightBreakpoint}`); this.currentHeightBreakpoint = heightBreakpoint; AppStorage.setOrCreate('currentHeightBreakpoint', this.currentHeightBreakpoint); } @@ -126,7 +122,6 @@ export class BreakpointSystem { } else { widthBp = BreakpointTypeEnum.XL; } - hilog.info(0x0000, TAG, '%{public}s', `widthBp: ${widthBp}`); this.updateCurrentWidthBreakpoint(widthBp); if (windowRatio < 0.8) { @@ -136,11 +131,10 @@ export class BreakpointSystem { } else { heightBp = BreakpointTypeEnum.MD; } - hilog.info(0x0000, TAG, '%{public}s', `heightBp: ${heightBp}`); this.updateCurrentHeightBreakpoint(heightBp) } catch (error) { - const err: BusinessError = error as BusinessError; - hilog.error(0x0000, TAG, `UpdateBreakpoint fail, error code: ${err.code}, message: ${err.message}`); + hilog.error(0x0000, TAG, '%{public}s', + `UpdateBreakpoint fail. code is ${(error as BusinessError).code} message is ${(error as BusinessError).message}`); } } } \ No newline at end of file diff --git a/liveviewlockscreenlibrary/src/main/ets/utils/LiveView.ets b/liveviewlockscreenlibrary/src/main/ets/utils/LiveView.ets index c8df1b6a66cb0f123068d993eff252747f5e5e82..71759a2e5716325f1aa13cbbf4116fa2aa7b4522 100644 --- a/liveviewlockscreenlibrary/src/main/ets/utils/LiveView.ets +++ b/liveviewlockscreenlibrary/src/main/ets/utils/LiveView.ets @@ -133,7 +133,7 @@ export class LiveView { wants: [ { bundleName: AppStorage.get('bundleName'), - abilityName: 'EntryAbility' + abilityName: 'LiveviewlockscreensampleAbility' } ], actionType: wantAgent.OperationType.START_ABILITY, diff --git a/liveviewlockscreenlibrary/src/main/ets/utils/LiveViewExtAbilityUtil.ets b/liveviewlockscreenlibrary/src/main/ets/utils/LiveViewExtAbilityUtil.ets index 0c677d0b785c3a221d1f546d915812daaddac1e3..8422aa2e550d83f41edf2495997e13cc4dc50c3a 100644 --- a/liveviewlockscreenlibrary/src/main/ets/utils/LiveViewExtAbilityUtil.ets +++ b/liveviewlockscreenlibrary/src/main/ets/utils/LiveViewExtAbilityUtil.ets @@ -24,7 +24,25 @@ import { LaneData } from '../model/RouteDataModel'; const TAG: string = '[LiveViewExtAbilityUtil]'; export class LiveViewExtAbilityUtil { - public static setSession(session: UIExtensionContentSession): void { + // Singleton pattern implementation + private static instance: LiveViewExtAbilityUtil; + private subscriber: commonEventManager.CommonEventSubscriber | null; + + // Private constructor for singleton pattern + private constructor() { + this.subscriber = null; + } + + // Singleton accessor method + public static getInstance(): LiveViewExtAbilityUtil { + // Lazy initialization of the singleton instance + if (!LiveViewExtAbilityUtil.instance) { + LiveViewExtAbilityUtil.instance = new LiveViewExtAbilityUtil(); + } + return LiveViewExtAbilityUtil.instance; + } + + public setSession(session: UIExtensionContentSession): void { let param: Record = { 'session': session }; @@ -63,10 +81,10 @@ export class LiveViewExtAbilityUtil { `Failed to create subscriber. code is ${error.code} message is ${error.message}.`); return; } - + this.subscriber = data; hilog.info(0x0000, TAG, '%{public}s', 'Succeeded in creating subscriber.'); // Event handling logic. - commonEventManager.subscribe(data, + commonEventManager.subscribe(this.subscriber, async (error: BusinessError, data: commonEventManager.CommonEventData) => { if (error) { hilog.error(0x0000, TAG, '%{public}s', @@ -107,4 +125,10 @@ export class LiveViewExtAbilityUtil { ; } } + + public destroySubscribe(): void { + commonEventManager.unsubscribe(this.subscriber, () => { + this.subscriber = null; + }); + } } \ No newline at end of file diff --git a/liveviewlockscreenlibrary/src/main/ets/utils/LiveViewUtil.ets b/liveviewlockscreenlibrary/src/main/ets/utils/LiveViewUtil.ets index 8efaf9d7ec333219768e20ffceaffd8c06da627e..a76b662c36fcb18658a6bf64f4bf2a201d5349ed 100644 --- a/liveviewlockscreenlibrary/src/main/ets/utils/LiveViewUtil.ets +++ b/liveviewlockscreenlibrary/src/main/ets/utils/LiveViewUtil.ets @@ -156,7 +156,7 @@ export class LiveViewUtil { const wantAgentInfo: wantAgent.WantAgentInfo = { wants: [{ bundleName: AppStorage.get('bundleName'), - abilityName: 'EntryAbility' + abilityName: 'LiveviewlockscreensampleAbility' } as Want], actionType: wantAgent.OperationType.START_ABILITIES, requestCode: 0, diff --git a/liveviewlockscreenlibrary/src/main/ets/utils/WindowUtil.ets b/liveviewlockscreenlibrary/src/main/ets/utils/WindowUtil.ets index 1d55016c3a841ba777c155d716551bc64b812011..dd1a7c9e0a8bf252cafbc73b91358121b256c0b5 100644 --- a/liveviewlockscreenlibrary/src/main/ets/utils/WindowUtil.ets +++ b/liveviewlockscreenlibrary/src/main/ets/utils/WindowUtil.ets @@ -22,8 +22,10 @@ const TAG: string = '[WindowUtil]'; export class WindowUtil { public static requestFullScreen(windowStage: window.WindowStage): void { - windowStage.getMainWindow((err: BusinessError, data: window.Window) => { - if (err.code) { + windowStage.getMainWindow((error: BusinessError, data: window.Window) => { + if (error.code) { + hilog.error(0x0000, TAG, '%{public}s', + `Failed to getMainWindow. Cause code: ${error.code}, message: ${error.message}`); return; } const windowObj: window.Window = data; @@ -51,9 +53,9 @@ export class WindowUtil { } public static registerBreakPoint(windowStage: window.WindowStage) { - windowStage.getMainWindow((err: BusinessError, data: window.Window) => { - if (err.code) { - hilog.error(0x0000, TAG, `Failed to get main window: ${err.message}`); + windowStage.getMainWindow((error: BusinessError, data: window.Window) => { + if (error.code) { + hilog.error(0x0000, TAG, `Failed to get main window. Cause code: ${error.code}, message: ${error.message}`); return; } BreakpointSystem.getInstance().updateWidthHeightBp(data); diff --git a/liveviewlockscreenlibrary/src/main/ets/view/TrafficView.ets b/liveviewlockscreenlibrary/src/main/ets/view/TrafficView.ets index 4ec89ceae8b45eeecbe5d35a7a2efaf2dd26ed59..7b27441321b235593d56094851e52181ce6ddb51 100644 --- a/liveviewlockscreenlibrary/src/main/ets/view/TrafficView.ets +++ b/liveviewlockscreenlibrary/src/main/ets/view/TrafficView.ets @@ -13,22 +13,32 @@ * limitations under the License. */ -import { LaneData } from '../model/RouteDataModel'; import { BreakpointType, BreakpointTypeEnum } from '../utils/BreakpointSystem'; import { TrafficInfoView } from './TrafficInfoView'; -import { hilog } from '@kit.PerformanceAnalysisKit'; @Component export struct TrafficView { @StorageProp('bottomRectHeight') bottomRectHeight: number = 0; - @Watch('test') @StorageLink('currentWidthBreakpoint') currentWidthBreakpoint: string = BreakpointTypeEnum.SM; - @Watch('test') @StorageLink('currentHeightBreakpoint') currentHeightBreakpoint: string = BreakpointTypeEnum.LG; - @State roadInfo: LaneData | undefined = undefined; - @State isShowButton: boolean = false; + @StorageLink('currentWidthBreakpoint') currentWidthBreakpoint: string = BreakpointTypeEnum.SM; + @StorageLink('currentHeightBreakpoint') currentHeightBreakpoint: string = BreakpointTypeEnum.LG; + @Prop lane: number = 2; + private updateInterval: number | undefined; - test(changedPropertyName: string) { - hilog.info(0x0000, '[test]', '%{public}s', `widthBp: ${this.currentWidthBreakpoint}`); - hilog.info(0x0000, '[test]', '%{public}s', `heightBp: ${this.currentHeightBreakpoint}`); + aboutToAppear(): void { + this.updateInterval = setInterval(() => { + if (this.lane === 2) { + this.lane = 1; + } else { + this.lane = 2; + } + }, 2000) + } + + aboutToDisappear(): void { + if (this.updateInterval !== undefined) { + clearInterval(this.updateInterval); + this.updateInterval = undefined; + } } build() { @@ -150,8 +160,14 @@ export struct TrafficView { Row() { Stack({ alignContent: Alignment.Top }) { - Image($r('app.media.traffic_right')) - .width(new BreakpointType({ sm: '70%', md: '50%', lg: '30%', }).getValue(this.currentWidthBreakpoint)) + if (this.lane === 2) { + Image($r('app.media.traffic_right')) + .width(new BreakpointType({ sm: '70%', md: '50%', lg: '30%', }).getValue(this.currentWidthBreakpoint)) + } else { + Image($r('app.media.traffic_left')) + .width(new BreakpointType({ sm: '70%', md: '50%', lg: '30%', }).getValue(this.currentWidthBreakpoint)) + } + Image($rawfile('traffic_light.svg')) .objectFit(ImageFit.Contain) .width(new BreakpointType({ sm: '20%', md: '15%', lg: '10%', }).getValue(this.currentWidthBreakpoint)) @@ -240,11 +256,19 @@ export struct TrafficView { left: 16, }) - Image($r('app.media.traffic_left')) - .width('60%') - .offset({ - y: 15, - }) + if (this.lane === 2) { + Image($r('app.media.traffic_right')) + .width('60%') + .offset({ + y: 15, + }) + } else { + Image($r('app.media.traffic_left')) + .width('60%') + .offset({ + y: 15, + }) + } Column() { Image($r('app.media.turn_right_light_rectangle')) diff --git a/liveviewlockscreenlibrary/src/main/resources/base/element/color.json b/liveviewlockscreenlibrary/src/main/resources/base/element/color.json index 0784b8b676f1271e2980eede6ca82b9b8ff1c344..4ed1297740ee47753074ba509f9b1f40bddfb7d4 100644 --- a/liveviewlockscreenlibrary/src/main/resources/base/element/color.json +++ b/liveviewlockscreenlibrary/src/main/resources/base/element/color.json @@ -27,6 +27,18 @@ { "name": "traffic_info_button", "value": "#08000000" + }, + { + "name": "tip", + "value": "#000000" + }, + { + "name": "tip_background", + "value": "#ffffff" + }, + { + "name": "tip_text", + "value": "#0A57F7" } ] } \ No newline at end of file diff --git a/liveviewlockscreenlibrary/src/main/resources/base/element/string.json b/liveviewlockscreenlibrary/src/main/resources/base/element/string.json index dda579115ab8bbbf50d5005b6c75990ad6ed046b..056f708939384c86af3ce060ad37bf096b118abd 100644 --- a/liveviewlockscreenlibrary/src/main/resources/base/element/string.json +++ b/liveviewlockscreenlibrary/src/main/resources/base/element/string.json @@ -14,7 +14,7 @@ }, { "name": "reason_background", - "value": "Background operation to update the live view" + "value": "后台更新实况窗数据" }, { "name": "traffic_info_meter", @@ -83,6 +83,18 @@ { "name": "Finish", "value": "停止导航" + }, + { + "name": "tip", + "value": "提示" + }, + { + "name": "tip_text", + "value": "申请锁屏沉浸实况窗权限可完整体验该功能" + }, + { + "name": "tip_get", + "value": "知道了" } ] } \ No newline at end of file diff --git a/liveviewlockscreenlibrary/src/main/resources/en_US/element/string.json b/liveviewlockscreenlibrary/src/main/resources/en_US/element/string.json index 05391e0022dd26d52165a8e4adde309dd7797837..6c50a7a695938c1875826fe15e3026a3df340aa1 100644 --- a/liveviewlockscreenlibrary/src/main/resources/en_US/element/string.json +++ b/liveviewlockscreenlibrary/src/main/resources/en_US/element/string.json @@ -83,6 +83,18 @@ { "name": "Finish", "value": "Finish" + }, + { + "name": "tip", + "value": "Tip" + }, + { + "name": "tip_text", + "value": "Permission is required to experience the lock screen immersive live window" + }, + { + "name": "tip_get", + "value": "I get" } ] } \ No newline at end of file diff --git a/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_right_dark_rectangle.png b/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_right_dark_rectangle.png index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..41f78ea0b59d840cfe841594f054b33257e33933 100644 Binary files a/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_right_dark_rectangle.png and b/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_right_dark_rectangle.png differ diff --git a/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_right_light_rectangle.png b/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_right_light_rectangle.png index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..52dff1c8ba8c9e3c48c150d2939ca376e1832ae9 100644 Binary files a/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_right_light_rectangle.png and b/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_right_light_rectangle.png differ diff --git a/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_right_light_square.png b/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_right_light_square.png index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..7941168e4f843aa2c850ba818d74fb63edee8a5d 100644 Binary files a/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_right_light_square.png and b/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_right_light_square.png differ diff --git a/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_straight_dark_rectangle.png b/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_straight_dark_rectangle.png index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..076ad2ccb161331ccc25eb95c76af10068839500 100644 Binary files a/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_straight_dark_rectangle.png and b/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_straight_dark_rectangle.png differ diff --git a/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_straight_light_rectangle.png b/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_straight_light_rectangle.png index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..c2177d04d55a2e64f4af52de19d19b6ebff2b521 100644 Binary files a/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_straight_light_rectangle.png and b/liveviewlockscreenlibrary/src/main/resources/rawfile/turn_straight_light_rectangle.png differ diff --git a/liveviewlockscreenlibrary/src/main/resources/zh_CN/element/string.json b/liveviewlockscreenlibrary/src/main/resources/zh_CN/element/string.json index dda579115ab8bbbf50d5005b6c75990ad6ed046b..056f708939384c86af3ce060ad37bf096b118abd 100644 --- a/liveviewlockscreenlibrary/src/main/resources/zh_CN/element/string.json +++ b/liveviewlockscreenlibrary/src/main/resources/zh_CN/element/string.json @@ -14,7 +14,7 @@ }, { "name": "reason_background", - "value": "Background operation to update the live view" + "value": "后台更新实况窗数据" }, { "name": "traffic_info_meter", @@ -83,6 +83,18 @@ { "name": "Finish", "value": "停止导航" + }, + { + "name": "tip", + "value": "提示" + }, + { + "name": "tip_text", + "value": "申请锁屏沉浸实况窗权限可完整体验该功能" + }, + { + "name": "tip_get", + "value": "知道了" } ] } \ No newline at end of file diff --git a/liveviewlockscreensample/src/main/ets/liveview/LiveViewExtAbility.ets b/liveviewlockscreensample/src/main/ets/liveview/LiveViewExtAbility.ets index 5baa43512489da994d03c9a181dcb78f53caa36f..34340aff8f6b3a3c6ea9a707db009b4f5573e5b9 100644 --- a/liveviewlockscreensample/src/main/ets/liveview/LiveViewExtAbility.ets +++ b/liveviewlockscreensample/src/main/ets/liveview/LiveViewExtAbility.ets @@ -45,14 +45,12 @@ export default class LiveViewExtAbility extends LiveViewLockScreenExtensionAbili // Core logic when creating UI session. onSessionCreate(_want: Want, session: UIExtensionContentSession): void { hilog.info(0x0000, TAG, '%{public}s', 'LiveViewLockScreenExtAbility onSessionCreate begin.'); - LiveViewExtAbilityUtil.setSession(session); + LiveViewExtAbilityUtil.getInstance().setSession(session); } // Cleanup operations when destroying UI session onSessionDestroy(): void { - commonEventManager.unsubscribe(this.subscriber, () => { - this.subscriber = null; - }); + LiveViewExtAbilityUtil.getInstance().destroySubscribe(); hilog.info(0x0000, TAG, '%{public}s', 'LiveViewLockScreenExtAbility onSessionDestroy begin.'); } diff --git a/liveviewlockscreensample/src/main/module.json5 b/liveviewlockscreensample/src/main/module.json5 index 839ebcd7ad20e313529a3af127e3900f7c10fba8..ff9557df5d81e97ce64a72087baecec5377f7532 100644 --- a/liveviewlockscreensample/src/main/module.json5 +++ b/liveviewlockscreensample/src/main/module.json5 @@ -14,10 +14,10 @@ "pages": "$profile:main_pages", "abilities": [ { - "name": "Liveviewlockscreenability", + "name": "LiveviewlockscreensampleAbility", "srcEntry": "./ets/entryability/EntryAbility.ets", "description": "$string:EntryAbility_desc", - "icon": "$media:layered_image", + "icon": "$media:startIcon", "label": "$string:EntryAbility_label", "startWindowIcon": "$media:startIcon", "startWindowBackground": "$color:start_window_background", diff --git a/liveviewlockscreensample/src/main/resources/rawfile/traffic_light.svg b/liveviewlockscreensample/src/main/resources/rawfile/traffic_light.svg deleted file mode 100644 index 683a432651f7dbc91b854f5f94ec51df3c310ade..0000000000000000000000000000000000000000 --- a/liveviewlockscreensample/src/main/resources/rawfile/traffic_light.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - Created with Pixso. - - - - - - - - - diff --git a/liveviewlockscreensample/src/main/resources/rawfile/turn_right_dark_rectangle.png b/liveviewlockscreensample/src/main/resources/rawfile/turn_right_dark_rectangle.png deleted file mode 100644 index 41f78ea0b59d840cfe841594f054b33257e33933..0000000000000000000000000000000000000000 Binary files a/liveviewlockscreensample/src/main/resources/rawfile/turn_right_dark_rectangle.png and /dev/null differ diff --git a/liveviewlockscreensample/src/main/resources/rawfile/turn_right_light_rectangle.png b/liveviewlockscreensample/src/main/resources/rawfile/turn_right_light_rectangle.png deleted file mode 100644 index 52dff1c8ba8c9e3c48c150d2939ca376e1832ae9..0000000000000000000000000000000000000000 Binary files a/liveviewlockscreensample/src/main/resources/rawfile/turn_right_light_rectangle.png and /dev/null differ diff --git a/liveviewlockscreensample/src/main/resources/rawfile/turn_right_light_square.png b/liveviewlockscreensample/src/main/resources/rawfile/turn_right_light_square.png deleted file mode 100644 index 7941168e4f843aa2c850ba818d74fb63edee8a5d..0000000000000000000000000000000000000000 Binary files a/liveviewlockscreensample/src/main/resources/rawfile/turn_right_light_square.png and /dev/null differ diff --git a/liveviewlockscreensample/src/main/resources/rawfile/turn_straight_dark_rectangle.png b/liveviewlockscreensample/src/main/resources/rawfile/turn_straight_dark_rectangle.png deleted file mode 100644 index 076ad2ccb161331ccc25eb95c76af10068839500..0000000000000000000000000000000000000000 Binary files a/liveviewlockscreensample/src/main/resources/rawfile/turn_straight_dark_rectangle.png and /dev/null differ diff --git a/liveviewlockscreensample/src/main/resources/rawfile/turn_straight_light_rectangle.png b/liveviewlockscreensample/src/main/resources/rawfile/turn_straight_light_rectangle.png deleted file mode 100644 index c2177d04d55a2e64f4af52de19d19b6ebff2b521..0000000000000000000000000000000000000000 Binary files a/liveviewlockscreensample/src/main/resources/rawfile/turn_straight_light_rectangle.png and /dev/null differ