diff --git a/OHBM/.gitignore b/OHBM/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..d2ff20141ceed86d87c0ea5d99481973005bab2b --- /dev/null +++ b/OHBM/.gitignore @@ -0,0 +1,12 @@ +/node_modules +/oh_modules +/local.properties +/.idea +**/build +/.hvigor +.cxx +/.clangd +/.clang-format +/.clang-tidy +**/.test +/.appanalyzer \ No newline at end of file diff --git a/OHBM/AppScope/app.json5 b/OHBM/AppScope/app.json5 new file mode 100644 index 0000000000000000000000000000000000000000..24a7b0ffdddccbd9d4e68fbdf12de5cdbf3822f9 --- /dev/null +++ b/OHBM/AppScope/app.json5 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "app": { + "bundleName": "com.example.ohbm", + "vendor": "example", + "versionCode": 1000000, + "versionName": "1.0.0", + "icon": "$media:app_icon", + "label": "$string:app_name" + } +} diff --git a/OHBM/AppScope/resources/base/element/string.json b/OHBM/AppScope/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..98b1d1a13247ef5025c003b36a843be0094141a1 --- /dev/null +++ b/OHBM/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "app_name", + "value": "OHBM" + } + ] +} diff --git a/OHBM/AppScope/resources/base/media/app_icon.png b/OHBM/AppScope/resources/base/media/app_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..a39445dc87828b76fed6d2ec470dd455c45319e3 Binary files /dev/null and b/OHBM/AppScope/resources/base/media/app_icon.png differ diff --git a/OHBM/build-profile.json5 b/OHBM/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..278e3201fd9f13803681bdccd77c54fb06ceb37a --- /dev/null +++ b/OHBM/build-profile.json5 @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "app": { + "signingConfigs": [], + "products": [ + { + "name": "default", + "signingConfig": "default", + "compatibleSdkVersion": "5.0.0(12)", + "runtimeOS": "HarmonyOS", + "buildOption": { + "strictMode": { + "caseSensitiveCheck": true, + "useNormalizedOHMUrl": true + } + } + } + ], + "buildModeSet": [ + { + "name": "debug", + }, + { + "name": "release" + } + ] + }, + "modules": [ + { + "name": "entry", + "srcPath": "./entry", + "targets": [ + { + "name": "default", + "applyToProducts": [ + "default" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/OHBM/code-linter.json5 b/OHBM/code-linter.json5 new file mode 100644 index 0000000000000000000000000000000000000000..4cbe51713c25985c14ede6b1701d1a03a1eb9800 --- /dev/null +++ b/OHBM/code-linter.json5 @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "files": [ + "**/*.ets" + ], + "ignore": [ + "**/src/ohosTest/**/*", + "**/src/test/**/*", + "**/src/mock/**/*", + "**/node_modules/**/*", + "**/oh_modules/**/*", + "**/build/**/*", + "**/.preview/**/*" + ], + "ruleSet": [ + "plugin:@performance/recommended", + "plugin:@typescript-eslint/recommended" + ], + "rules": { + } +} \ No newline at end of file diff --git a/OHBM/entry/.gitignore b/OHBM/entry/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..e2713a2779c5a3e0eb879efe6115455592caeea5 --- /dev/null +++ b/OHBM/entry/.gitignore @@ -0,0 +1,6 @@ +/node_modules +/oh_modules +/.preview +/build +/.cxx +/.test \ No newline at end of file diff --git a/OHBM/entry/build-profile.json5 b/OHBM/entry/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..b1643078992c66fc15dc1d7daededf195e2e3596 --- /dev/null +++ b/OHBM/entry/build-profile.json5 @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "apiType": "stageMode", + "buildOption": { + }, + "buildOptionSet": [ + { + "name": "release", + "arkOptions": { + "obfuscation": { + "ruleOptions": { + "enable": false, + "files": [ + "./obfuscation-rules.txt" + ] + } + } + } + }, + ], + "targets": [ + { + "name": "default" + }, + { + "name": "ohosTest", + } + ] +} \ No newline at end of file diff --git a/OHBM/entry/hvigorfile.ts b/OHBM/entry/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..062d98c989f16e668785474735b1d35e73b3a104 --- /dev/null +++ b/OHBM/entry/hvigorfile.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { hapTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins:[] /* Custom plugin to extend the functionality of Hvigor. */ +} diff --git a/OHBM/entry/obfuscation-rules.txt b/OHBM/entry/obfuscation-rules.txt new file mode 100644 index 0000000000000000000000000000000000000000..272efb6ca3f240859091bbbfc7c5802d52793b0b --- /dev/null +++ b/OHBM/entry/obfuscation-rules.txt @@ -0,0 +1,23 @@ +# Define project specific obfuscation rules here. +# You can include the obfuscation configuration files in the current module's build-profile.json5. +# +# For more details, see +# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5 + +# Obfuscation options: +# -disable-obfuscation: disable all obfuscations +# -enable-property-obfuscation: obfuscate the property names +# -enable-toplevel-obfuscation: obfuscate the names in the global scope +# -compact: remove unnecessary blank spaces and all line feeds +# -remove-log: remove all console.* statements +# -print-namecache: print the name cache that contains the mapping from the old names to new names +# -apply-namecache: reuse the given cache file + +# Keep options: +# -keep-property-name: specifies property names that you want to keep +# -keep-global-name: specifies names that you want to keep in the global scope + +-enable-property-obfuscation +-enable-toplevel-obfuscation +-enable-filename-obfuscation +-enable-export-obfuscation \ No newline at end of file diff --git a/OHBM/entry/oh-package.json5 b/OHBM/entry/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..56c084745fc903ba2a1c5ab978620447c2902570 --- /dev/null +++ b/OHBM/entry/oh-package.json5 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "name": "entry", + "version": "1.0.0", + "description": "Please describe the basic information.", + "main": "", + "author": "", + "license": "", + "dependencies": {} +} + diff --git a/OHBM/entry/src/main/ets/entryability/EntryAbility.ets b/OHBM/entry/src/main/ets/entryability/EntryAbility.ets new file mode 100644 index 0000000000000000000000000000000000000000..796015d51d0c911fe287f20f8d0d6e29721ee771 --- /dev/null +++ b/OHBM/entry/src/main/ets/entryability/EntryAbility.ets @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { AbilityConstant, UIAbility, Want } from '@kit.AbilityKit'; +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { window } from '@kit.ArkUI'; + +export default class EntryAbility extends UIAbility { + onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onCreate'); + } + + onDestroy(): void { + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: window.WindowStage): void { + // Main window is created, set main page for this ability + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/Index', (err) => { + if (err.code) { + hilog.error(0x0000, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err) ?? ''); + return; + } + hilog.info(0x0000, 'testTag', 'Succeeded in loading the content.'); + }); + } + + onWindowStageDestroy(): void { + // Main window is destroyed, release UI related resources + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground(): void { + // Ability has brought to foreground + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onForeground'); + } + + onBackground(): void { + // Ability has back to background + hilog.info(0x0000, 'testTag', '%{public}s', 'Ability onBackground'); + } +} diff --git a/OHBM/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets b/OHBM/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets new file mode 100644 index 0000000000000000000000000000000000000000..73c3db80c33b4631e743524e520bef546b15407c --- /dev/null +++ b/OHBM/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { BackupExtensionAbility, BundleVersion } from '@kit.CoreFileKit'; + +export default class EntryBackupAbility extends BackupExtensionAbility { + async onBackup() { + hilog.info(0x0000, 'testTag', 'onBackup ok'); + } + + async onRestore(bundleVersion: BundleVersion) { + hilog.info(0x0000, 'testTag', 'onRestore ok %{public}s', JSON.stringify(bundleVersion)); + } +} \ No newline at end of file diff --git a/OHBM/entry/src/main/ets/pages/Index.ets b/OHBM/entry/src/main/ets/pages/Index.ets new file mode 100644 index 0000000000000000000000000000000000000000..61860feba14fd0668500703b67820f236b5174aa --- /dev/null +++ b/OHBM/entry/src/main/ets/pages/Index.ets @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Entry +@Component +struct Index { + @State message: string = '开鸿测评(OpenHarmony Benchmarks)'; + + build() { + RelativeContainer() { + Text(this.message) + .id('HelloWorld') + .fontSize(50) + .fontWeight(FontWeight.Bold) + .alignRules({ + center: { anchor: '__container__', align: VerticalAlign.Center }, + middle: { anchor: '__container__', align: HorizontalAlign.Center } + }) + } + .height('100%') + .width('100%') + } +} \ No newline at end of file diff --git a/OHBM/entry/src/main/module.json5 b/OHBM/entry/src/main/module.json5 new file mode 100644 index 0000000000000000000000000000000000000000..f9d8ebc21fc548dcd4118b1819b0f87d692f19c0 --- /dev/null +++ b/OHBM/entry/src/main/module.json5 @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "module": { + "name": "entry", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": [ + "phone", + "tablet", + "2in1" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "abilities": [ + { + "name": "EntryAbility", + "srcEntry": "./ets/entryability/EntryAbility.ets", + "description": "$string:EntryAbility_desc", + "icon": "$media:layered_image", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:startIcon", + "startWindowBackground": "$color:start_window_background", + "exported": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ] + } + ], + "extensionAbilities": [ + { + "name": "EntryBackupAbility", + "srcEntry": "./ets/entrybackupability/EntryBackupAbility.ets", + "type": "backup", + "exported": false, + "metadata": [ + { + "name": "ohos.extension.backup", + "resource": "$profile:backup_config" + } + ], + } + ] + } +} \ No newline at end of file diff --git a/OHBM/entry/src/main/resources/base/element/color.json b/OHBM/entry/src/main/resources/base/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..3c712962da3c2751c2b9ddb53559afcbd2b54a02 --- /dev/null +++ b/OHBM/entry/src/main/resources/base/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + } + ] +} \ No newline at end of file diff --git a/OHBM/entry/src/main/resources/base/element/string.json b/OHBM/entry/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..f94595515a99e0c828807e243494f57f09251930 --- /dev/null +++ b/OHBM/entry/src/main/resources/base/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "label" + } + ] +} \ No newline at end of file diff --git a/OHBM/entry/src/main/resources/base/media/background.png b/OHBM/entry/src/main/resources/base/media/background.png new file mode 100644 index 0000000000000000000000000000000000000000..f939c9fa8cc8914832e602198745f592a0dfa34d Binary files /dev/null and b/OHBM/entry/src/main/resources/base/media/background.png differ diff --git a/OHBM/entry/src/main/resources/base/media/foreground.png b/OHBM/entry/src/main/resources/base/media/foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..4483ddad1f079e1089d685bd204ee1cfe1d01902 Binary files /dev/null and b/OHBM/entry/src/main/resources/base/media/foreground.png differ diff --git a/OHBM/entry/src/main/resources/base/media/layered_image.json b/OHBM/entry/src/main/resources/base/media/layered_image.json new file mode 100644 index 0000000000000000000000000000000000000000..fb49920440fb4d246c82f9ada275e26123a2136a --- /dev/null +++ b/OHBM/entry/src/main/resources/base/media/layered_image.json @@ -0,0 +1,7 @@ +{ + "layered-image": + { + "background" : "$media:background", + "foreground" : "$media:foreground" + } +} \ No newline at end of file diff --git a/OHBM/entry/src/main/resources/base/media/startIcon.png b/OHBM/entry/src/main/resources/base/media/startIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b Binary files /dev/null and b/OHBM/entry/src/main/resources/base/media/startIcon.png differ diff --git a/OHBM/entry/src/main/resources/base/profile/backup_config.json b/OHBM/entry/src/main/resources/base/profile/backup_config.json new file mode 100644 index 0000000000000000000000000000000000000000..78f40ae7c494d71e2482278f359ec790ca73471a --- /dev/null +++ b/OHBM/entry/src/main/resources/base/profile/backup_config.json @@ -0,0 +1,3 @@ +{ + "allowToBackupRestore": true +} \ No newline at end of file diff --git a/OHBM/entry/src/main/resources/base/profile/main_pages.json b/OHBM/entry/src/main/resources/base/profile/main_pages.json new file mode 100644 index 0000000000000000000000000000000000000000..1898d94f58d6128ab712be2c68acc7c98e9ab9ce --- /dev/null +++ b/OHBM/entry/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,5 @@ +{ + "src": [ + "pages/Index" + ] +} diff --git a/OHBM/entry/src/main/resources/en_US/element/string.json b/OHBM/entry/src/main/resources/en_US/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..f94595515a99e0c828807e243494f57f09251930 --- /dev/null +++ b/OHBM/entry/src/main/resources/en_US/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "label" + } + ] +} \ No newline at end of file diff --git a/OHBM/entry/src/main/resources/zh_CN/element/string.json b/OHBM/entry/src/main/resources/zh_CN/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..597ecf95e61d7e30367c22fe2f8638008361b044 --- /dev/null +++ b/OHBM/entry/src/main/resources/zh_CN/element/string.json @@ -0,0 +1,16 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "模块描述" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "label" + } + ] +} \ No newline at end of file diff --git a/OHBM/entry/src/mock/mock-config.json5 b/OHBM/entry/src/mock/mock-config.json5 new file mode 100644 index 0000000000000000000000000000000000000000..02a864fc9a59fc4d36d7e0040088c18dff7e0af6 --- /dev/null +++ b/OHBM/entry/src/mock/mock-config.json5 @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ +} \ No newline at end of file diff --git a/OHBM/entry/src/ohosTest/ets/test/Ability.test.ets b/OHBM/entry/src/ohosTest/ets/test/Ability.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..5a48599530ea996875aa52768d580abff072976e --- /dev/null +++ b/OHBM/entry/src/ohosTest/ets/test/Ability.test.ets @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; + +export default function abilityTest() { + describe('ActsAbilityTest', () => { + // Defines a test suite. Two parameters are supported: test suite name and test suite function. + beforeAll(() => { + // Presets an action, which is performed only once before all test cases of the test suite start. + // This API supports only one parameter: preset action function. + }) + beforeEach(() => { + // Presets an action, which is performed before each unit test case starts. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: preset action function. + }) + afterEach(() => { + // Presets a clear action, which is performed after each unit test case ends. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: clear action function. + }) + afterAll(() => { + // Presets a clear action, which is performed after all test cases of the test suite end. + // This API supports only one parameter: clear action function. + }) + it('assertContain', 0, () => { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + hilog.info(0x0000, 'testTag', '%{public}s', 'it begin'); + let a = 'abc'; + let b = 'b'; + // Defines a variety of assertion methods, which are used to declare expected boolean conditions. + expect(a).assertContain(b); + expect(a).assertEqual(a); + }) + }) +} \ No newline at end of file diff --git a/OHBM/entry/src/ohosTest/ets/test/List.test.ets b/OHBM/entry/src/ohosTest/ets/test/List.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..c2837c227bf131d12ddc70f8e749201a123ba1c9 --- /dev/null +++ b/OHBM/entry/src/ohosTest/ets/test/List.test.ets @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import abilityTest from './Ability.test'; + +export default function testsuite() { + abilityTest(); +} \ No newline at end of file diff --git a/OHBM/entry/src/ohosTest/module.json5 b/OHBM/entry/src/ohosTest/module.json5 new file mode 100644 index 0000000000000000000000000000000000000000..ee9fbe0fc791b13b7993a65cb2b810a0f6b0fcdc --- /dev/null +++ b/OHBM/entry/src/ohosTest/module.json5 @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "module": { + "name": "entry_test", + "type": "feature", + "deviceTypes": [ + "phone", + "tablet", + "2in1" + ], + "deliveryWithInstall": true, + "installationFree": false + } +} diff --git a/OHBM/entry/src/test/List.test.ets b/OHBM/entry/src/test/List.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..b4be29517b9c43ed2652d060f41d69b841eee05f --- /dev/null +++ b/OHBM/entry/src/test/List.test.ets @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import localUnitTest from './LocalUnit.test'; + +export default function testsuite() { + localUnitTest(); +} \ No newline at end of file diff --git a/OHBM/entry/src/test/LocalUnit.test.ets b/OHBM/entry/src/test/LocalUnit.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..3bc9aea2d059daf93f2c7f23005371df8263637e --- /dev/null +++ b/OHBM/entry/src/test/LocalUnit.test.ets @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; + +export default function localUnitTest() { + describe('localUnitTest', () => { + // Defines a test suite. Two parameters are supported: test suite name and test suite function. + beforeAll(() => { + // Presets an action, which is performed only once before all test cases of the test suite start. + // This API supports only one parameter: preset action function. + }); + beforeEach(() => { + // Presets an action, which is performed before each unit test case starts. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: preset action function. + }); + afterEach(() => { + // Presets a clear action, which is performed after each unit test case ends. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: clear action function. + }); + afterAll(() => { + // Presets a clear action, which is performed after all test cases of the test suite end. + // This API supports only one parameter: clear action function. + }); + it('assertContain', 0, () => { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + let a = 'abc'; + let b = 'b'; + // Defines a variety of assertion methods, which are used to declare expected boolean conditions. + expect(a).assertContain(b); + expect(a).assertEqual(a); + }); + }); +} \ No newline at end of file diff --git a/OHBM/hvigor/hvigor-config.json5 b/OHBM/hvigor/hvigor-config.json5 new file mode 100644 index 0000000000000000000000000000000000000000..f7aaef0e822723e6e717e0fefd950deda71315e7 --- /dev/null +++ b/OHBM/hvigor/hvigor-config.json5 @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "modelVersion": "5.0.0", + "dependencies": { + }, + "execution": { + // "analyze": "normal", /* Define the build analyze mode. Value: [ "normal" | "advanced" | false ]. Default: "normal" */ + // "daemon": true, /* Enable daemon compilation. Value: [ true | false ]. Default: true */ + // "incremental": true, /* Enable incremental compilation. Value: [ true | false ]. Default: true */ + // "parallel": true, /* Enable parallel compilation. Value: [ true | false ]. Default: true */ + // "typeCheck": false, /* Enable typeCheck. Value: [ true | false ]. Default: false */ + }, + "logging": { + // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */ + }, + "debugging": { + // "stacktrace": false /* Disable stacktrace compilation. Value: [ true | false ]. Default: false */ + }, + "nodeOptions": { + // "maxOldSpaceSize": 8192 /* Enable nodeOptions maxOldSpaceSize compilation. Unit M. Used for the daemon process. Default: 8192*/ + // "exposeGC": true /* Enable to trigger garbage collection explicitly. Default: true*/ + } +} diff --git a/OHBM/hvigorfile.ts b/OHBM/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..7523fdc92cc2c1a83b6cdb898aef337980b43423 --- /dev/null +++ b/OHBM/hvigorfile.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { appTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins:[] /* Custom plugin to extend the functionality of Hvigor. */ +} diff --git a/OHBM/oh-package-lock.json5 b/OHBM/oh-package-lock.json5 new file mode 100644 index 0000000000000000000000000000000000000000..3976e98b5af33d64655abb327cea3ef223a29b79 --- /dev/null +++ b/OHBM/oh-package-lock.json5 @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "meta": { + "stableOrder": true + }, + "lockfileVersion": 3, + "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.", + "specifiers": { + "@ohos/hamock@1.0.0": "@ohos/hamock@1.0.0", + "@ohos/hypium@1.0.19": "@ohos/hypium@1.0.19" + }, + "packages": { + "@ohos/hamock@1.0.0": { + "name": "@ohos/hamock", + "version": "1.0.0", + "integrity": "sha512-K6lDPYc6VkKe6ZBNQa9aoG+ZZMiwqfcR/7yAVFSUGIuOAhPvCJAo9+t1fZnpe0dBRBPxj2bxPPbKh69VuyAtDg==", + "resolved": "https://repo.harmonyos.com/ohpm/@ohos/hamock/-/hamock-1.0.0.har", + "registryType": "ohpm" + }, + "@ohos/hypium@1.0.19": { + "name": "@ohos/hypium", + "version": "1.0.19", + "integrity": "sha512-cEjDgLFCm3cWZDeRXk7agBUkPqjWxUo6AQeiu0gEkb3J8ESqlduQLSIXeo3cCsm8U/asL7iKjF85ZyOuufAGSQ==", + "resolved": "https://repo.harmonyos.com/ohpm/@ohos/hypium/-/hypium-1.0.19.har", + "registryType": "ohpm" + } + } +} \ No newline at end of file diff --git a/OHBM/oh-package.json5 b/OHBM/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..7172564aba354cf9b2d5bf0e541451e1a7f467b3 --- /dev/null +++ b/OHBM/oh-package.json5 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "modelVersion": "5.0.0", + "description": "Please describe the basic information.", + "dependencies": { + }, + "devDependencies": { + "@ohos/hypium": "1.0.19", + "@ohos/hamock": "1.0.0" + } +} diff --git a/ostest_integration_test b/ostest_integration_test deleted file mode 160000 index 29b583f867a7712f0d6d9cdd2d0ac131fff0681a..0000000000000000000000000000000000000000 --- a/ostest_integration_test +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 29b583f867a7712f0d6d9cdd2d0ac131fff0681a diff --git a/scenario/MusicPlayerOnline/AppScope/app.json5 b/scenario/MusicPlayerOnline/AppScope/app.json5 index 9a53154cf5e1c745211efb2a3aa9064ff55761d8..ebae582de1ed13d3520bf7e4d29c1091a93d5dc7 100644 --- a/scenario/MusicPlayerOnline/AppScope/app.json5 +++ b/scenario/MusicPlayerOnline/AppScope/app.json5 @@ -1,9 +1,24 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "app": { "bundleName": "com.example.musicPlayerOnline", "vendor": "example", - "versionCode": 1000001, - "versionName": "1.0.1", + "versionCode": 1000002, + "versionName": "1.0.2", "icon": "$media:app_icon", "label": "$string:app_name" } diff --git a/scenario/MusicPlayerOnline/README_zh.md b/scenario/MusicPlayerOnline/README_zh.md index acd79e0a68b9da4d282caebbe862ef83f7b53e07..ff206b10fb47337e412840b90b49fd1b73cc2cd3 100644 --- a/scenario/MusicPlayerOnline/README_zh.md +++ b/scenario/MusicPlayerOnline/README_zh.md @@ -23,7 +23,7 @@ 1.1 未登录【推荐歌单】:内容由服务器控制 1.2 登录状态的【推荐歌单】:最近播放、我的收藏,由服务器控制 1.3 登录状态的【我的歌单】 - 1.4 点击歌单播放,弹窗提示 + 1.4 点击歌单查看,双击歌单直接播放 1.5 播放状态条 1.5.1 封面图片及动画 1.5.2 歌名及歌手 diff --git a/scenario/MusicPlayerOnline/build-profile.json5 b/scenario/MusicPlayerOnline/build-profile.json5 index 08c1020ec5e875914469282dfcf13a18075e4edc..07334a896918f7087cf6f9891ff1b4f94eac0187 100644 --- a/scenario/MusicPlayerOnline/build-profile.json5 +++ b/scenario/MusicPlayerOnline/build-profile.json5 @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "app": { "signingConfigs": [], diff --git a/scenario/MusicPlayerOnline/entry/build-profile.json5 b/scenario/MusicPlayerOnline/entry/build-profile.json5 index 197e83c1b9504b12a3837e0189185479662cad4b..6709f6bf42cf1340418925673eb6d5c25cad191d 100644 --- a/scenario/MusicPlayerOnline/entry/build-profile.json5 +++ b/scenario/MusicPlayerOnline/entry/build-profile.json5 @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "apiType": "stageMode", "buildOption": { diff --git a/scenario/MusicPlayerOnline/entry/hvigorfile.ts b/scenario/MusicPlayerOnline/entry/hvigorfile.ts index c6edcd90486dd5a853cf7d34c8647f08414ca7a3..062d98c989f16e668785474735b1d35e73b3a104 100644 --- a/scenario/MusicPlayerOnline/entry/hvigorfile.ts +++ b/scenario/MusicPlayerOnline/entry/hvigorfile.ts @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { hapTasks } from '@ohos/hvigor-ohos-plugin'; export default { diff --git a/scenario/MusicPlayerOnline/entry/oh-package.json5 b/scenario/MusicPlayerOnline/entry/oh-package.json5 index 248c3b7541a589682a250f86a6d3ecf7414d2d6a..56c084745fc903ba2a1c5ab978620447c2902570 100644 --- a/scenario/MusicPlayerOnline/entry/oh-package.json5 +++ b/scenario/MusicPlayerOnline/entry/oh-package.json5 @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "name": "entry", "version": "1.0.0", diff --git a/scenario/MusicPlayerOnline/entry/src/main/ets/manager/HttpManager.ets b/scenario/MusicPlayerOnline/entry/src/main/ets/manager/HttpManager.ets index c3ca89753287a12edb7289b1f44baa691561465c..88b00f373e99319a80f324fa08c3ac33228ec74f 100644 --- a/scenario/MusicPlayerOnline/entry/src/main/ets/manager/HttpManager.ets +++ b/scenario/MusicPlayerOnline/entry/src/main/ets/manager/HttpManager.ets @@ -61,7 +61,7 @@ export default class HttpManager { this.httpRequest.request(AppStorage.get(AppConstants.SERVER_HOST_PROP) + AppConstants.CSRF_URL, (err: Error, data: http.HttpResponse) => { if (!err) { - Logger.info(this.tag, 'HttpResponse Result:' + data.result); + //Logger.info(this.tag, 'HttpResponse Result:' + data.result); try { const jsonObject: object = JSON.parse(data.result as string); this.csrfToken = jsonObject['csrf_token']; @@ -77,7 +77,7 @@ export default class HttpManager { }, (err: Error, data: http.HttpResponse) => { if (!err) { - Logger.info(this.tag, 'HttpResponse Result:' + data.result); + //Logger.info(this.tag, 'HttpResponse Result:' + data.result); if ((data.result as string).indexOf(AppConstants.REGISTER_FAILED) !== -1) { prompt.showToast({ message: AppConstants.REGISTER_INFO_FAILED + data.result @@ -122,7 +122,7 @@ export default class HttpManager { this.httpRequest.request(AppStorage.get(AppConstants.SERVER_HOST_PROP) + AppConstants.CSRF_URL, (err: Error, data: http.HttpResponse) => { if (!err) { - Logger.info(this.tag, 'HttpResponse Result:' + data.result); + //Logger.info(this.tag, 'HttpResponse Result:' + data.result); try { const jsonObject: object = JSON.parse(data.result as string); this.csrfToken = jsonObject['csrf_token']; @@ -138,7 +138,7 @@ export default class HttpManager { }, (err: Error, data: http.HttpResponse) => { if (!err) { - Logger.info(this.tag, 'HttpResponse Result:' + data.result); + //Logger.info(this.tag, 'HttpResponse Result:' + data.result); if (200 === data.responseCode) { Logger.info(this.tag, 'HttpResponse code:' + (data.result as string).indexOf(AppConstants.LOGIN_FAILED)); @@ -219,7 +219,7 @@ export default class HttpManager { }, (err: Error, data: http.HttpResponse) => { if (!err) { - Logger.info(this.tag, 'HttpResponse record_recent Result:' + data.result); + //Logger.info(this.tag, 'HttpResponse record_recent Result:' + data.result); try { const jsonObject: object = JSON.parse(data.result as string); this.PlayerManager.setItemQuality(jsonObject['message']); @@ -270,7 +270,7 @@ export default class HttpManager { }, (err: Error, data: http.HttpResponse) => { if (!err) { - Logger.info(this.tag, 'HttpResponse Result:' + data.result); + //Logger.info(this.tag, 'HttpResponse Result:' + data.result); try { const jsonObject: object = JSON.parse(data.result as string); switch (jsonObject["message"]) { @@ -336,7 +336,7 @@ export default class HttpManager { }, (err: Error, data: http.HttpResponse) => { if (!err) { - Logger.info(this.tag, 'HttpResponse Result:' + data.result); + //Logger.info(this.tag, 'HttpResponse Result:' + data.result); try { const jsonObject: object = JSON.parse(data.result as string); Logger.info(this.tag, 'HttpResponse msg:' + jsonObject["message"]); @@ -390,7 +390,7 @@ export default class HttpManager { }, (err: Error, data: http.HttpResponse) => { if (!err) { - Logger.info(this.tag, 'HttpResponse Result:' + data.result); + //Logger.info(this.tag, 'HttpResponse Result:' + data.result); try { const jsonObject: object = JSON.parse(data.result as string); Logger.info(this.tag, 'HttpResponse msg:' + jsonObject["message"]); @@ -433,7 +433,7 @@ export default class HttpManager { }, (err: Error, data: http.HttpResponse) => { if (!err) { - Logger.info(this.tag, 'HttpResponse getRecommendListFromServer Result:' + data.result); + //Logger.info(this.tag, 'HttpResponse getRecommendListFromServer Result:' + data.result); try { let isStart = true; const jsonObject: object = JSON.parse(data.result as string); @@ -496,7 +496,7 @@ export default class HttpManager { }, (err: Error, data: http.HttpResponse) => { if (!err) { - Logger.info(this.tag, 'HttpResponse getFavorListFromServer Result:' + data.result); + //Logger.info(this.tag, 'HttpResponse getFavorListFromServer Result:' + data.result); try { let aPlayingList: AudioData[] = Array(); const jsonObject: object = JSON.parse(data.result as string); @@ -555,7 +555,7 @@ export default class HttpManager { }, (err: Error, data: http.HttpResponse) => { if (!err) { - Logger.info(this.tag, 'HttpResponse getRecentListFromServer Result:' + data.result); + //Logger.info(this.tag, 'HttpResponse getRecentListFromServer Result:' + data.result); try { const jsonObject: object = JSON.parse(data.result as string); let isStart = true; @@ -615,7 +615,7 @@ export default class HttpManager { }, (err: Error, data: http.HttpResponse) => { if (!err) { - Logger.info(this.tag, 'HttpResponse getCustomListFromServer Result:' + data.result); + //Logger.info(this.tag, 'HttpResponse getCustomListFromServer Result:' + data.result); try { interface PlaylistItem { playlist_name: string; @@ -689,7 +689,7 @@ export default class HttpManager { }, (err: Error, data: http.HttpResponse) => { if (!err) { - Logger.info(this.tag, 'HttpResponse searchSongsFromServer Result:' + data.result); + //Logger.info(this.tag, 'HttpResponse searchSongsFromServer Result:' + data.result); try { const jsonObject: object = JSON.parse(data.result as string); let isStart = true; @@ -744,7 +744,7 @@ export default class HttpManager { }, (err: Error, data: http.HttpResponse) => { if (!err) { - Logger.info(this.tag, 'HttpResponse getLrc Result:' + data.result); + //Logger.info(this.tag, 'HttpResponse getLrc Result:' + data.result); try { const jsonObject: object = JSON.parse(data.result as string); let id: string = jsonObject['id']; @@ -777,13 +777,13 @@ export default class HttpManager { }, (err: Error, data: http.HttpResponse) => { if (!err) { - Logger.info(this.tag, 'HttpResponse getAllSinger Result:' + data.result); try { let jsonObject: object = JSON.parse(data.result as string); let playingLists: PlayListData[] = []; Object.keys(jsonObject).forEach((key) => { let item = new PlayListData(key, $r('app.media.icon'), '', [], ''); - item.count = jsonObject[key] as number; + item.count = jsonObject[key].count as number; + item.indexer = jsonObject[key].indexer as string; playingLists.push(item); }); let eventData: emitter.EventData = { @@ -822,7 +822,6 @@ export default class HttpManager { }, (err: Error, data: http.HttpResponse) => { if (!err) { - Logger.info(this.tag, 'HttpResponse getAllSongsBySinger Result:' + data.result); try { const jsonObject: object = JSON.parse(data.result as string); Object.keys(jsonObject).forEach((key) => { diff --git a/scenario/MusicPlayerOnline/entry/src/main/ets/manager/PlayerManager.ets b/scenario/MusicPlayerOnline/entry/src/main/ets/manager/PlayerManager.ets index 1333ccb4183aa13ad287787784efe49a77df4f61..5267cb765850b63bcc675acca61402405e51de8c 100644 --- a/scenario/MusicPlayerOnline/entry/src/main/ets/manager/PlayerManager.ets +++ b/scenario/MusicPlayerOnline/entry/src/main/ets/manager/PlayerManager.ets @@ -138,43 +138,39 @@ export default class PlayerManager { }) avPlayer.on('stateChange', async (state: string, reason: media.StateChangeReason) => { switch (state) { - case AppConstants.PLAYER_STATE_IDLE: // 成功调用reset接口后触发该状态机上报 - Logger.info(this.tag, 'PlayerManager state idle called.'); - //avPlayer.release(); // 调用release接口销毁实例对象 + case AppConstants.PLAYER_STATE_IDLE: + //Logger.info(this.tag, 'PlayerManager state idle called.'); + //avPlayer.release(); break; - case AppConstants.PLAYER_STATE_INITIALIZED: // avplayer 设置播放源后触发该状态上报 - Logger.info(this.tag, 'PlayerManager state initialized called.'); + case AppConstants.PLAYER_STATE_INITIALIZED: + //Logger.info(this.tag, 'PlayerManager state initialized called.'); avPlayer.prepare(); break; - case AppConstants.PLAYER_STATE_PREPARED: // prepare调用成功后上报该状态机 - Logger.info(this.tag, 'PlayerManager state prepared called.'); - avPlayer.play(); // 调用播放接口开始播放 + case AppConstants.PLAYER_STATE_PREPARED: + //Logger.info(this.tag, 'PlayerManager state prepared called.'); + avPlayer.play(); break; - case AppConstants.PLAYER_STATE_PLAYING: // play成功调用后触发该状态机上报 - Logger.info(this.tag, 'PlayerManager state playing called.'); + case AppConstants.PLAYER_STATE_PLAYING: + //Logger.info(this.tag, 'PlayerManager state playing called.'); this.list[this.listPosition].isPlaying = true; HttpManager.getInstance().record_recent(); break; - case AppConstants.PLAYER_STATE_PAUSED: // pause成功调用后触发该状态机上报 - Logger.info(this.tag, 'PlayerManager state paused called.'); + case AppConstants.PLAYER_STATE_PAUSED: + //Logger.info(this.tag, 'PlayerManager state paused called.'); break; - case AppConstants.PLAYER_STATE_COMPLETED: // 播放结束后触发该状态机上报 - Logger.info(this.tag, 'PlayerManager state completed called.'); - //avPlayer.stop(); //调用播放结束接口 - this.next(); + case AppConstants.PLAYER_STATE_COMPLETED: + //Logger.info(this.tag, 'PlayerManager state completed called.'); + avPlayer.stop(); break; - case AppConstants.PLAYER_STATE_STOPPED: // stop接口成功调用后触发该状态机上报 - Logger.info(this.tag, 'PlayerManager state stopped called.'); - //this.stopContinuousTask(); - this.currentTime = 0; - Logger.info(this.tag, 'Stop:' + this.item.title); - avPlayer.reset(); // 调用reset接口初始化avplayer状态 + case AppConstants.PLAYER_STATE_STOPPED: + //Logger.info(this.tag, 'PlayerManager state stopped called.'); + this.next(); break; case AppConstants.PLAYER_STATE_RELEASED: - Logger.info(this.tag, 'PlayerManager state released called.'); + //Logger.info(this.tag, 'PlayerManager state released called.'); break; default: - Logger.info(this.tag, 'PlayerManager state unknown called.'); + //Logger.info(this.tag, 'PlayerManager state unknown called.'); if (this.avPlayer !== undefined) { try { this.avPlayer.release(); @@ -538,9 +534,16 @@ export default class PlayerManager { emitter.emit(AppConstants.MAIN_UPDATE_STATE, this.emitterOptions, eventData); emitter.emit(AppConstants.DETAIL_UPDATE_STATE, this.emitterOptions, eventData); emitter.emit(AppConstants.PLAYLIST_UPDATE_STATE, this.emitterOptions, eventData); - if (this.state === AppConstants.PLAYER_STATE_IDLE) { + if (this.state === AppConstants.PLAYER_STATE_STOPPED) { + //this.stopContinuousTask(); + this.currentTime = 0; this.lrcIndex = 0; - this.updateLrcIndex(); + let eventData: emitter.EventData = { + data: { + "newLrcIndex": this.lrcIndex, + } + }; + emitter.emit(AppConstants.DETAIL_UPDATE_LRC_INDEX, this.emitterOptions, eventData); } } diff --git a/scenario/MusicPlayerOnline/entry/src/main/ets/model/AllSingerDataSource.ets b/scenario/MusicPlayerOnline/entry/src/main/ets/model/AllSingerDataSource.ets index 7bcbc67f6d696eb715f5fde154262ce953fcd99b..df4f8f088371ef47a2c09c53d9567b9c1f55a6e0 100644 --- a/scenario/MusicPlayerOnline/entry/src/main/ets/model/AllSingerDataSource.ets +++ b/scenario/MusicPlayerOnline/entry/src/main/ets/model/AllSingerDataSource.ets @@ -82,45 +82,50 @@ export default class AllSingerDataSource implements IDataSource { } // 增加前面数据 - public add1stItem(item:PlayListData): void { + public add1stItem(item: PlayListData): void { this.dataArray.splice(0, 0, item) this.notifyDataAdd(0) } // 在数据尾部增加一个元素 - public addLastItem(item:PlayListData): void { + public addLastItem(item: PlayListData): void { this.dataArray.splice(this.dataArray.length, 0, item) this.notifyDataAdd(this.dataArray.length - 1) } // 在指定索引位置增加一个元素 - public addItem(index: number,item:PlayListData): void { + public addItem(index: number, item: PlayListData): void { this.dataArray.splice(index, 0, item) this.notifyDataAdd(index) } + // 增加一组数据 + public addItems(alist:PlayListData[]): void { + this.dataArray = this.dataArray.concat(alist) + this.notifyDataReload() + } + + // 替换数据 + public setData(data: PlayListData[]): void { + this.dataArray = data.slice() + this.notifyDataReload(); + } + + // 删除所有元素 + public clear(): void { + this.dataArray = [] + this.notifyDataReload(); + } + // 删除第一个元素 public delete1stItem(): void { this.dataArray.splice(0, 1) this.notifyDataDelete(0) } - // 删除第二个元素 - public delete2ndItem(): void { - this.dataArray.splice(1, 1) - this.notifyDataDelete(1) - } - // 删除最后一个元素 public deleteLastItem(): void { this.dataArray.splice(-1, 1) this.notifyDataDelete(this.dataArray.length) } - - // 重新加载数据 - public reload(): void { - this.dataArray.splice(1, 1) - this.dataArray.splice(3, 2) - this.notifyDataReload() - } } \ No newline at end of file diff --git a/scenario/MusicPlayerOnline/entry/src/main/ets/model/PlayListData.ets b/scenario/MusicPlayerOnline/entry/src/main/ets/model/PlayListData.ets index d104770269d4c3e99e0ca80e0086b2e2f5875623..8fdccb42baf8661a9e0a50f0cfa50730dd7456e1 100644 --- a/scenario/MusicPlayerOnline/entry/src/main/ets/model/PlayListData.ets +++ b/scenario/MusicPlayerOnline/entry/src/main/ets/model/PlayListData.ets @@ -34,6 +34,7 @@ export default class PlayListData { list: AudioData[] = []; isCustom = false; count: number = 0; + indexer: string = '#' constructor(title: string, img: Resource, subTitle: string, list: AudioData[], others?: string) { this.title = title; diff --git a/scenario/MusicPlayerOnline/entry/src/main/ets/view/AllSinger.ets b/scenario/MusicPlayerOnline/entry/src/main/ets/view/AllSinger.ets index 6805e766aa45c7da35a9a3be7bdb694ce6557e3d..f648e5424e034efdd3f39c44112419a43bf83445 100644 --- a/scenario/MusicPlayerOnline/entry/src/main/ets/view/AllSinger.ets +++ b/scenario/MusicPlayerOnline/entry/src/main/ets/view/AllSinger.ets @@ -25,21 +25,30 @@ export default struct AllSinger { private tag = 'AllSinger'; private currentIndex: number = 0; private step: number = 100; - @State count: number = 0 + private scroller: Scroller = new Scroller(); + private totalData: PlayListData[] = []; + private currentAlphabet: string = '全'; + @State count: number = 0; + @State isLoading: boolean = false; @Link isShowSingerList: boolean; + @State alphabetIndexerHead: string[] = + ['全', '#', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', + 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', + 'U', 'V', 'W', 'X', 'Y', 'Z']; private aAllSingerDataSource: AllSingerDataSource = new AllSingerDataSource(); aboutToAppear() { HttpManager.getInstance().getAllSinger(0, this.step); emitter.on(AppConstants.UPDATE_ALL_SINGER_LIST, (eventData: emitter.EventData) => { + this.isLoading = true; if (eventData.data !== undefined && eventData.data.item !== undefined) { let list = eventData.data.item as PlayListData[]; if (list.length === 0) { + this.isLoading = false; return; } - for (let index = 0; index < list.length; index++) { - this.aAllSingerDataSource.addLastItem(list[index]) - } + this.aAllSingerDataSource.addItems(list); + this.totalData = this.totalData.concat(list); this.currentIndex += this.step; this.count = this.aAllSingerDataSource.totalCount(); HttpManager.getInstance().getAllSinger(this.currentIndex, this.currentIndex + this.step); @@ -79,25 +88,63 @@ export default struct AllSinger { .width('100%') .margin(4) - WaterFlow() { - LazyForEach(this.aAllSingerDataSource, (item: PlayListData, index) => { - FlowItem() { - SingerItem({ item }) - } - .backgroundColor(Color.White) - .borderRadius(12) - }, (item: string) => item) + Stack({ alignContent: Alignment.TopStart }) { + WaterFlow({ scroller: this.scroller }) { + LazyForEach(this.aAllSingerDataSource, (item: PlayListData, index) => { + FlowItem() { + SingerItem({ item }) + }.backgroundColor(Color.White) + .borderRadius(12) + }) + } + .columnsTemplate("1fr 1fr 1fr 1fr") + .columnsGap(8) + .rowsGap(16) + .padding({ left: '10%', right: 8 }) + .margin({ bottom: 64 }) + .scrollBar(BarState.On) + .scrollBarWidth(10) + + AlphabetIndexer({ arrayValue: this.alphabetIndexerHead, selected: 0 }) + .autoCollapse(false) + .itemSize(20) + .selectedFont({ size: 20 }) + .font({ size: 16 }) + .onSelect((index: number) => { + if (!this.isLoading) { + this.updateDataBySelect(this.alphabetIndexerHead[index]); + } + }) + .enabled(!this.isLoading) + .width('10%') } - .columnsTemplate("1fr 1fr 1fr 1fr") - .columnsGap(8) - .rowsGap(16) - .padding({ left: 8, right: 8 }) - .margin({ bottom: 64 }) - .scrollBar(BarState.On) - .scrollBarWidth(10) } .alignItems(HorizontalAlign.Center) .height('100%') .width('100%') } + + updateDataBySelect(indexer: string) { + if (indexer === this.currentAlphabet) { + return; + } + this.currentAlphabet = indexer; + this.aAllSingerDataSource.clear(); + let newData: PlayListData[] = [] + if (indexer === '全') { + newData = this.totalData; + } else { + this.totalData.forEach(aSinger => { + if (aSinger.indexer === indexer) { + newData.push(aSinger); + } + }) + } + setTimeout(() => { + animateTo({ duration: 500 }, () => { + this.aAllSingerDataSource.setData(newData); + this.count = this.aAllSingerDataSource.totalCount(); + }) + }, 100) + } } diff --git a/scenario/MusicPlayerOnline/entry/src/main/ets/view/PlayerBar.ets b/scenario/MusicPlayerOnline/entry/src/main/ets/view/PlayerBar.ets index d1f5c1c60fc56f0307d1b38a57341a57c981dc81..7aebc1d87c02b0533196705b82781344fcb58633 100644 --- a/scenario/MusicPlayerOnline/entry/src/main/ets/view/PlayerBar.ets +++ b/scenario/MusicPlayerOnline/entry/src/main/ets/view/PlayerBar.ets @@ -35,7 +35,6 @@ export default struct PlayerBar { private spaces: string = ' ' aboutToAppear() { - Logger.info(this.tag, 'aboutToAppear'); emitter.on(AppConstants.MAIN_UPDATE_STATE, (eventData: emitter.EventData) => { this.updateState(eventData) }); @@ -43,7 +42,6 @@ export default struct PlayerBar { aboutToDisappear() { emitter.off(AppConstants.MAIN_UPDATE_STATE); - Logger.info(this.tag, 'aboutToDisappear'); } build() { diff --git a/scenario/MusicPlayerOnline/entry/src/main/ets/view/PlayerDetail.ets b/scenario/MusicPlayerOnline/entry/src/main/ets/view/PlayerDetail.ets index e8883da747b3a5b3c529516946f18d032ecef869..7508c2da3db51e6a82cba27093bd3c3142feb087 100644 --- a/scenario/MusicPlayerOnline/entry/src/main/ets/view/PlayerDetail.ets +++ b/scenario/MusicPlayerOnline/entry/src/main/ets/view/PlayerDetail.ets @@ -420,11 +420,11 @@ export default struct PlayerDetail { } updateFavor() { - setTimeout(() => { if (this.item.id === this.PlayerManager.getItem().id) { - this.item.isFavor = this.PlayerManager.getItem().isFavor; + animateTo({duration:1000},()=>{ + this.item = this.PlayerManager.getItem(); + }) } - }, 1000); } updateLrc() { diff --git a/scenario/MusicPlayerOnline/entry/src/main/module.json5 b/scenario/MusicPlayerOnline/entry/src/main/module.json5 index 20bdc85428cc4546f462291bc9749eb16b142740..e3bf7bb9628b4cd2607a53686d74f489f9d57ed7 100644 --- a/scenario/MusicPlayerOnline/entry/src/main/module.json5 +++ b/scenario/MusicPlayerOnline/entry/src/main/module.json5 @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "module": { "name": "entry", diff --git a/scenario/MusicPlayerOnline/entry/src/mock/mock-config.json5 b/scenario/MusicPlayerOnline/entry/src/mock/mock-config.json5 index 7a73a41bfdf76d6f793007240d80983a52f15f97..02a864fc9a59fc4d36d7e0040088c18dff7e0af6 100644 --- a/scenario/MusicPlayerOnline/entry/src/mock/mock-config.json5 +++ b/scenario/MusicPlayerOnline/entry/src/mock/mock-config.json5 @@ -1,2 +1,17 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { } \ No newline at end of file diff --git a/scenario/MusicPlayerOnline/entry/src/ohosTest/module.json5 b/scenario/MusicPlayerOnline/entry/src/ohosTest/module.json5 index 4fc9701701e879512edc8da21b356970a89e5166..a7a10fedd0152e20cc6204f497638264327da0da 100644 --- a/scenario/MusicPlayerOnline/entry/src/ohosTest/module.json5 +++ b/scenario/MusicPlayerOnline/entry/src/ohosTest/module.json5 @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "module": { "name": "entry_test", diff --git a/scenario/MusicPlayerOnline/hvigor/hvigor-config.json5 b/scenario/MusicPlayerOnline/hvigor/hvigor-config.json5 index 8c56bf6a23806e1ce92f72ed34a38613e27c494f..fbb13fa70310457617de309b91d9d19be4f2b62a 100644 --- a/scenario/MusicPlayerOnline/hvigor/hvigor-config.json5 +++ b/scenario/MusicPlayerOnline/hvigor/hvigor-config.json5 @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "modelVersion": "5.0.0", "dependencies": { diff --git a/scenario/MusicPlayerOnline/hvigorfile.ts b/scenario/MusicPlayerOnline/hvigorfile.ts index f3cb9f1a87a81687554a76283af8df27d8bda775..7523fdc92cc2c1a83b6cdb898aef337980b43423 100644 --- a/scenario/MusicPlayerOnline/hvigorfile.ts +++ b/scenario/MusicPlayerOnline/hvigorfile.ts @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + import { appTasks } from '@ohos/hvigor-ohos-plugin'; export default { diff --git a/scenario/MusicPlayerOnline/oh-package-lock.json5 b/scenario/MusicPlayerOnline/oh-package-lock.json5 index aa353fc14645a3a4d0ba9a389c315d2001db97b0..94b1117f437ae396c4679fa73ad7a2b5b673b49b 100644 --- a/scenario/MusicPlayerOnline/oh-package-lock.json5 +++ b/scenario/MusicPlayerOnline/oh-package-lock.json5 @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "meta": { "stableOrder": true diff --git a/scenario/MusicPlayerOnline/oh-package.json5 b/scenario/MusicPlayerOnline/oh-package.json5 index 1a3714167ff27ba3a2aeb76cedcbb22d2d017b1a..b8b959dccead81b96a59da32266f307d3ce8a876 100644 --- a/scenario/MusicPlayerOnline/oh-package.json5 +++ b/scenario/MusicPlayerOnline/oh-package.json5 @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + { "modelVersion": "5.0.0", "name": "musicPlayerOnline",