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

first commit #1

Open
wants to merge 12 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
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
/entry/.preview
.cxx
/node_modules
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# smart_watch_seven
watch 7
This is a smart watch library
trial
33 changes: 33 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply plugin: 'com.huawei.ohos.app'

//For instructions on signature configuration, see https://developer.harmonyos.com/en/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
ohos {
compileSdkVersion 6
}

buildscript {
repositories {
maven {
url 'https://repo.huaweicloud.com/repository/maven/'
}
maven {
url 'https://developer.huawei.com/repo/'
}
}
dependencies {
classpath 'com.huawei.ohos:hap:3.0.3.4'
classpath 'com.huawei.ohos:decctest:1.2.6.0'
}
}

allprojects {
repositories {
maven {
url 'https://repo.huaweicloud.com/repository/maven/'
}
maven {
url 'https://developer.huawei.com/repo/'
}
}
}
2 changes: 2 additions & 0 deletions entry/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/build
/node_modules
26 changes: 26 additions & 0 deletions entry/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apply plugin: 'com.huawei.ohos.hap'
apply plugin: 'com.huawei.ohos.decctest'
//For instructions on signature configuration, see https://developer.harmonyos.com/en/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
ohos {
compileSdkVersion 6
defaultConfig {
compatibleSdkVersion 5
}
buildTypes {
release {
proguardOpt {
proguardEnabled false
rulesFiles 'proguard-rules.pro'
}
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
testImplementation 'junit:junit:4.13.1'
ohosTestImplementation 'com.huawei.ohos.testkit:runner:1.0.0.200'
}
decc {
supportType = ['html','xml']
}
3 changes: 3 additions & 0 deletions entry/package-lock.json

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

1 change: 1 addition & 0 deletions entry/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions entry/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# config module specific ProGuard rules here.
74 changes: 74 additions & 0 deletions entry/src/main/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"app": {
"bundleName": "com.example.smartwatchseven",
"vendor": "example",
"version": {
"code": 1000000,
"name": "1.0.0"
}
},
"deviceConfig": {},
"module": {
"package": "com.example.smartwatchseven",
"name": ".MyApplication",
"mainAbility": "com.example.smartwatchseven.MainAbility",
"deviceType": [
"phone",
"tablet",
"tv",
"wearable"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry",
"installationFree": false
},
"abilities": [
{
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
],
"visible": true,
"name": "com.example.smartwatchseven.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:entry_MainAbility",
"type": "page",
"launchType": "standard"
}
],
"js": [
{
"pages": [
"pages/index/index"
],
"name": "default",
"window": {
"designWidth": 720,
"autoDesignWidth": true
}
}
],
"reqPermissions": [
{
"name": "ohos.permission.ACTIVITY_MOTION",
"reason": "To count steps",
"usedScene":
{
"ability": [
"com.example.smartwatchseven.MainAbility"
],
"when": "always"
}
}
]
}
}
16 changes: 16 additions & 0 deletions entry/src/main/java/com/example/smartwatchseven/MainAbility.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.example.smartwatchseven;

import ohos.ace.ability.AceAbility;
import ohos.aafwk.content.Intent;

public class MainAbility extends AceAbility {
@Override
public void onStart(Intent intent) {
super.onStart(intent);
}

@Override
public void onStop() {
super.onStop();
}
}
10 changes: 10 additions & 0 deletions entry/src/main/java/com/example/smartwatchseven/MyApplication.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.example.smartwatchseven;

import ohos.aafwk.ability.AbilityPackage;

public class MyApplication extends AbilityPackage {
@Override
public void onInitialize() {
super.onInitialize();
}
}
23 changes: 23 additions & 0 deletions entry/src/main/js/default/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.
Binary file added entry/src/main/js/default/common/images/bg.png
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 added entry/src/main/js/default/common/images/cloudy.png
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 added entry/src/main/js/default/common/images/rainy.png
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 added entry/src/main/js/default/common/images/sleeting.png
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 added entry/src/main/js/default/common/images/sunny.png
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 added entry/src/main/js/default/common/images/windy.png
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.
5 changes: 5 additions & 0 deletions entry/src/main/js/default/i18n/en-US.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"strings": {
"start_count": "Start Step Count"
}
}
7 changes: 7 additions & 0 deletions entry/src/main/js/default/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/default/i18n/zh-CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"strings": {
"hello": "您好",
"world": "世界"
},
"Files": {
}
}
Loading