Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatted code #3

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions .github/workflows/main.yml

This file was deleted.

30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Smart Watch Seven


* Copyright (C) 2022 Application Library Engineering Group
*
* 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.


The smart watch seven has the following functionalities

1.Displays current weather , date , month.

2.Displays calendar notification.

3.Displays number of foot steps covered by user.

4.Displays calories burnt by user.


<img width="268" alt="Screenshot_2022-05-12_225247-removebg-preview" src="https://user-images.githubusercontent.com/105449448/168287925-f823ce37-e2e2-4e4c-bd4e-4a908286d42e.png">
27 changes: 27 additions & 0 deletions build-profile.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"app": {
"signingConfigs": [],
"compileSdkVersion": 8,
"compatibleSdkVersion": 8,
"products": [
{
"name": "default",
"signingConfig": "default",
}
]
},
"modules": [
{
"name": "entry",
"srcPath": "./entry",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
}
]
}
10 changes: 10 additions & 0 deletions entry/build-profile.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"apiType": 'faMode',
"buildOption": {
},
"targets": [
{
"name": "default",
}
]
}
2 changes: 2 additions & 0 deletions entry/hvigorfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
module.exports = require('@ohos/hvigor-ohos-plugin').legacyHapTasks
5 changes: 5 additions & 0 deletions entry/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions entry/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "entry",
"version": "1.0.0",
"ohos": {
"org": "huawei",
"buildTool": "hvigor",
"directoryLevel": "module"
},
"description": "example description",
"repository": {},
"license": "ISC",
"dependencies": {}
}
64 changes: 64 additions & 0 deletions entry/src/main/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"app": {
"vendor": "example",
"bundleName": "com.example.myapplication",
"version": {
"code": 1000000,
"name": "1.0.0"
}
},
"deviceConfig": {},
"module": {
"mainAbility": ".MainAbility",
"deviceType": [
"phone",
"tablet"
],
"abilities": [
{
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
],
"orientation": "unspecified",
"visible": true,
"srcPath": "MainAbility",
"name": ".MainAbility",
"srcLanguage": "js",
"icon": "$media:icon",
"description": "$string:MainAbility_desc",
"formsEnabled": false,
"label": "$string:MainAbility_label",
"type": "page",
"launchType": "standard"
}
],
"distro": {
"moduleType": "entry",
"installationFree": false,
"deliveryWithInstall": true,
"moduleName": "entry"
},
"package": "com.example.smartwatchseven",
"srcPath": "",
"name": ".entry",
"js": [
{
"pages": [
"pages/index/index"
],
"name": ".MainAbility",
"window": {
"designWidth": 720,
"autoDesignWidth": false
}
}
]
}
}
23 changes: 23 additions & 0 deletions entry/src/main/js/MainAbility/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import ability_featureAbility from '@ohos.ability.featureAbility'

export default {
onCreate() {
console.info('AceApplication onCreate');
//requestPermission()
},
onDestroy() {
console.info('AceApplication onDestroy');
}
};

function requestPermission() {
var context = ability_featureAbility.getContext();
let permissions = ["ohos.permission.ACTIVITY_MOTION"];
let requestCode = 123
context.requestPermissionsFromUser(permissions, requestCode)
.then((data) => {
console.info('Permission Granted')
}).catch((error) => {
console.error('Permission Denied')
})
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 8 additions & 0 deletions entry/src/main/js/MainAbility/i18n/en-US.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"strings": {
"hello": "Hello",
"world": "World"
},
"Files": {
}
}
7 changes: 7 additions & 0 deletions entry/src/main/js/MainAbility/i18n/weather_api.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"latitude": "28.4595",
"longitude": "77.0266",
"api_key": "55e15ebc8fdd929dd4c16583773384f3"
}
]
8 changes: 8 additions & 0 deletions entry/src/main/js/MainAbility/i18n/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"strings": {
"hello": "您好",
"world": "世界"
},
"Files": {
}
}
Loading