!5 support build by api level 9

Merge pull request !5 from yangpeng85/master
This commit is contained in:
openharmony_ci
2022-06-14 08:07:14 +00:00
committed by Gitee
14 changed files with 74 additions and 119 deletions
+3 -5
View File
@@ -1,13 +1,11 @@
{
"app": {
"bundleName": "com.ohos.theme",
"vendor": "ohos",
"bundleName": "com.example.ohosproject.hmservice",
"vendor": "example",
"versionCode": 1000000,
"versionName": "1.0.0",
"icon": "$media:app_icon",
"label": "$string:app_name",
"distributedNotificationEnabled": true,
"minAPIVersion": 9,
"targetAPIVersion": 9
"distributedNotificationEnabled": true
}
}
+1 -1
View File
@@ -2,7 +2,7 @@
"string": [
{
"name": "app_name",
"value": "theme"
"value": "Theme"
}
]
}
+1
View File
@@ -6,6 +6,7 @@
"products": [
{
"name": "default",
"signingConfig": "default"
},
],
},
+1
View File
@@ -1,2 +1,3 @@
/node_modules
/.preview
/build
-3
View File
@@ -5,9 +5,6 @@
"targets": [
{
"name": "default",
},
{
"name": "ohosTest",
}
]
}
+5
View File
@@ -0,0 +1,5 @@
{
"name": "entry",
"version": "1.0.0",
"lockfileVersion": 1
}
+13 -10
View File
@@ -1,11 +1,14 @@
{
"name": "entry",
"version": "1.0.0",
"ohos": {
"org": "huawei",
"buildTool": "hvigor",
"directoryLevel": "module"
},
"dependencies": {
}
}
"license":"ISC",
"devDependencies":{},
"name":"entry",
"ohos":{
"org":"huawei",
"directoryLevel":"module",
"buildTool":"hvigor"
},
"description":"example description",
"repository":{},
"version":"1.0.0",
"dependencies":{}
}
@@ -28,6 +28,7 @@ export default class MainAbility extends Ability {
onWindowStageCreate(windowStage) {
// Main window is created, set main page for this ability
console.log("ExtWallpaper: MainAbility onWindowStageCreate")
windowStage.setUIContent(this.context, "pages/index", null)
}
onWindowStageDestroy() {
@@ -1,3 +1,4 @@
// @ts-nocheck
/**
* Copyright (c) 2022 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -49,15 +50,13 @@ export default class WallpaperExtAbility extends Extension {
}
sendPixelMapData() {
console.info(MODULE_TAG + 'ability send pixel map data start');
wallPaper.getPixelMap(0, (err, data) => {
console.info(MODULE_TAG + 'ability get pixel map data start');
if (err) {
console.info(MODULE_TAG + 'ability get pixel map failed, error : ' + JSON.stringify(err));
} else {
console.info(MODULE_TAG + 'ability get pixel map, data : ' + JSON.stringify(data));
AppStorage.SetOrCreate('slPixelData', data);
}
console.info(MODULE_TAG + 'ability get pixel map data end');
console.info(MODULE_TAG + 'ability get pixel map, err: ' + JSON.stringify(err) +
" data: " + JSON.stringify(data));
AppStorage.SetOrCreate('slPixelData', data);
console.info(MODULE_TAG + 'ability set or create end');
});
console.info(MODULE_TAG + 'ability send pixel map data end');
}
};
-47
View File
@@ -1,47 +0,0 @@
/**
* Copyright (c) 2022 Huawei Device 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 router from '@ohos.router';
@Entry
@Component
struct Second {
@State message: string = 'Second Page'
build() {
Row() {
Column() {
Text(this.message)
.fontSize(50)
.fontWeight(FontWeight.Bold)
Button() {
Text('back to index')
.fontSize(20)
.fontWeight(FontWeight.Bold)
}.type(ButtonType.Capsule)
.margin({
top: 20
})
.backgroundColor('#0D9FFB')
.width('35%')
.height('5%')
.onClick(()=>{
router.back()
})
}
.width('100%')
}
.height('100%')
}
}
+24 -12
View File
@@ -2,11 +2,11 @@
"module": {
"name": "entry",
"type": "entry",
"srcEntrance": "./ets/Application/AbilityStage.ts",
"description": "$string:entry_desc",
"mainElement": "MainAbility",
"deviceTypes": [
"phone",
"tablet"
],
"deliveryWithInstall": true,
"installationFree": false,
@@ -23,21 +23,33 @@
"skills": [
{
"entities": [
"entity.system.home",
"entity.system.home"
],
"actions": [
"action.system.home",
],
},
],
"action.system.home"
]
}
]
}
],
"requestPermissions": [
{
"name": "ohos.permission.GET_WALLPAPER"
},
{
"name": "ohos.permission.READ_USER_STORAGE"
}
],
"extensionAbilities": [
{
"name": "WallpaperExtAbility",
"srcEntrance": "./ets/WallpaperExtAbility/WallpaperExtAbility.ts",
"description": "$string:WallpaperExtAbility_desc",
"icon": "$media:icon",
"label": "$string:WallpaperExtAbility_label",
},
],
},
"description": "$string:MainAbility_desc",
"icon": "$media:icon",
"label": "$string:app_name",
"visible": true,
"type": "wallpaper",
}
]
}
}
@@ -1,6 +1,5 @@
{
"src": [
"pages/index",
"pages/second"
"pages/index"
]
}
-16
View File
@@ -1,16 +0,0 @@
## This file is automatically generated by DevEco Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file should *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
#sdk.dir=C:/Users/zwx602444/AppData/Local/OpenHarmony/Sdk
#nodejs.dir=D:/deveco-studio-3.0.1.831.win/deveco-studio/tools/nodejs
#npm.dir=D:/deveco-studio-3.0.1.831.win/deveco-studio/tools/nodejs
sdk.dir=
nodejs.dir=
npm.dir=
+17 -15
View File
@@ -1,16 +1,18 @@
{
"name": "theme",
"version": "1.0.0",
"ohos": {
"org": "huawei",
"buildTool": "hvigor",
"directoryLevel": "project"
},
"dependencies": {
"@ohos/hvigor": "file:localdep/ohos-hvigor-1.0.3-rc.tgz",
"@ohos/hvigor-base": "file:localdep/ohos-hvigor-base-1.0.3-rc.tgz",
"@ohos/hvigor-log": "file:localdep/ohos-hvigor-log-1.0.3-rc.tgz",
"@ohos/hvigor-ohos-plugin": "file:localdep/ohos-hvigor-ohos-plugin-1.0.3-rc.tgz",
"@ohos/sdkmanager-common": "file:localdep/sdkmanager-common-1.1.1.tgz"
}
}
"license":"ISC",
"devDependencies":{},
"name":"applications_theme",
"ohos":{
"org":"huawei",
"directoryLevel":"project",
"buildTool":"hvigor"
},
"description":"example description",
"repository":{},
"version":"1.0.0",
"dependencies":{
"@ohos/hvigor-ohos-plugin":"1.0.6",
"hypium":"^1.0.0",
"@ohos/hvigor":"1.0.6"
}
}