diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.gitignore b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.gitignore
new file mode 100644
index 00000000..37a4eb8b
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.gitignore
@@ -0,0 +1,15 @@
+*.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
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/.gitignore b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/.gitignore
new file mode 100644
index 00000000..26d33521
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/compiler.xml b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/compiler.xml
new file mode 100644
index 00000000..61a9130c
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/compiler.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/gradle.xml b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/gradle.xml
new file mode 100644
index 00000000..b9090f42
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/gradle.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/jarRepositories.xml b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/jarRepositories.xml
new file mode 100644
index 00000000..1dfcd020
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/jarRepositories.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/misc.xml b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/misc.xml
new file mode 100644
index 00000000..58918f50
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/previewer/phone/phoneSettingConfig_-925978332.json b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/previewer/phone/phoneSettingConfig_-925978332.json
new file mode 100644
index 00000000..f505e6b9
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/previewer/phone/phoneSettingConfig_-925978332.json
@@ -0,0 +1,25 @@
+{
+ "setting": {
+ "1.0.1": {
+ "Language": {
+ "args": {
+ "Language": "zh-CN"
+ }
+ }
+ }
+ },
+ "frontend": {
+ "1.0.0": {
+ "Resolution": {
+ "args": {
+ "Resolution": "360*780"
+ }
+ },
+ "DeviceType": {
+ "args": {
+ "DeviceType": "phone"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/previewer/phone/phoneSettingConfig_1789527875.json b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/previewer/phone/phoneSettingConfig_1789527875.json
new file mode 100644
index 00000000..f505e6b9
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/previewer/phone/phoneSettingConfig_1789527875.json
@@ -0,0 +1,25 @@
+{
+ "setting": {
+ "1.0.1": {
+ "Language": {
+ "args": {
+ "Language": "zh-CN"
+ }
+ }
+ }
+ },
+ "frontend": {
+ "1.0.0": {
+ "Resolution": {
+ "args": {
+ "Resolution": "360*780"
+ }
+ },
+ "DeviceType": {
+ "args": {
+ "DeviceType": "phone"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/previewer/previewConfig.json b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/previewer/previewConfig.json
new file mode 100644
index 00000000..3e83069d
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/previewer/previewConfig.json
@@ -0,0 +1,12 @@
+{
+ "1.0.0": {
+ "LastPreviewDevice": {
+ "C:\\Users\\lucifer\\DevEcoStudioProjects\\assignment_app\\entry": [
+ "phone"
+ ],
+ "C:\\Users\\lucifer\\Desktop\\alpesh_assignment\\assessment\\HarmonyOS\\Day2 Assingment\\Alpesh\\assignment_app\\entry": [
+ "phone"
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/vcs.xml b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/vcs.xml
new file mode 100644
index 00000000..4fce1d86
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/build.gradle b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/build.gradle
new file mode 100644
index 00000000..9ec29b00
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/build.gradle
@@ -0,0 +1,37 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+apply plugin: 'com.huawei.ohos.app'
+
+ohos {
+ compileSdkVersion 5
+ defaultConfig {
+ compatibleSdkVersion 4
+ }
+}
+
+buildscript {
+ repositories {
+ maven {
+ url 'https://repo.huaweicloud.com/repository/maven/'
+ }
+ maven {
+ url 'https://developer.huawei.com/repo/'
+ }
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.huawei.ohos:hap:2.4.2.7'
+ classpath 'com.huawei.ohos:decctest:1.0.0.7'
+ }
+}
+
+allprojects {
+ repositories {
+ maven {
+ url 'https://repo.huaweicloud.com/repository/maven/'
+ }
+ maven {
+ url 'https://developer.huawei.com/repo/'
+ }
+ jcenter()
+ }
+}
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/.gitignore b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/.gitignore
new file mode 100644
index 00000000..796b96d1
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/build.gradle b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/build.gradle
new file mode 100644
index 00000000..30c5f30b
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/build.gradle
@@ -0,0 +1,26 @@
+apply plugin: 'com.huawei.ohos.hap'
+apply plugin: 'com.huawei.ohos.decctest'
+ohos {
+ compileSdkVersion 5
+ defaultConfig {
+ compatibleSdkVersion 4
+ }
+ buildTypes {
+ release {
+ proguardOpt {
+ proguardEnabled false
+ rulesFiles 'proguard-rules.pro'
+ }
+ }
+ }
+
+}
+
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
+ testImplementation 'junit:junit:4.13'
+ ohosTestImplementation 'com.huawei.ohos.testkit:runner:1.0.0.100'
+}
+decc {
+ supportType = ['html','xml']
+}
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/proguard-rules.pro b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/proguard-rules.pro
new file mode 100644
index 00000000..f7666e47
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/proguard-rules.pro
@@ -0,0 +1 @@
+# config module specific ProGuard rules here.
\ No newline at end of file
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/config.json b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/config.json
new file mode 100644
index 00000000..1375b2a7
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/config.json
@@ -0,0 +1,49 @@
+{
+ "app": {
+ "bundleName": "com.example.assignment_app",
+ "vendor": "example",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ },
+ "apiVersion": {
+ "compatible": 4,
+ "target": 5,
+ "releaseType": "Release"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.example.assignment_app",
+ "name": ".MyApplication",
+ "deviceType": [
+ "phone"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "entry",
+ "moduleType": "entry"
+ },
+ "abilities": [
+ {
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ],
+ "orientation": "unspecified",
+ "name": "com.example.assignment_app.MainAbility",
+ "icon": "$media:icon",
+ "description": "$string:mainability_description",
+ "label": "$string:app_name",
+ "type": "page",
+ "launchType": "standard"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/MainAbility.java b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/MainAbility.java
new file mode 100644
index 00000000..8346e010
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/MainAbility.java
@@ -0,0 +1,13 @@
+package com.example.assignment_app;
+
+import com.example.assignment_app.slice.MainAbilitySlice;
+import ohos.aafwk.ability.Ability;
+import ohos.aafwk.content.Intent;
+
+public class MainAbility extends Ability {
+ @Override
+ public void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setMainRoute(MainAbilitySlice.class.getName());
+ }
+}
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/MyApplication.java b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/MyApplication.java
new file mode 100644
index 00000000..d9b5646c
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/MyApplication.java
@@ -0,0 +1,10 @@
+package com.example.assignment_app;
+
+import ohos.aafwk.ability.AbilityPackage;
+
+public class MyApplication extends AbilityPackage {
+ @Override
+ public void onInitialize() {
+ super.onInitialize();
+ }
+}
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Login.java b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Login.java
new file mode 100644
index 00000000..4806f1bb
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Login.java
@@ -0,0 +1,13 @@
+package com.example.assignment_app.slice;
+
+import com.example.assignment_app.ResourceTable;
+import ohos.aafwk.ability.AbilitySlice;
+import ohos.aafwk.content.Intent;
+
+public class Login extends AbilitySlice {
+ @Override
+ protected void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setUIContent(ResourceTable.Layout_login);
+ }
+}
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/MainAbilitySlice.java b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/MainAbilitySlice.java
new file mode 100644
index 00000000..7e518788
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/MainAbilitySlice.java
@@ -0,0 +1,28 @@
+package com.example.assignment_app.slice;
+
+import com.example.assignment_app.ResourceTable;
+import ohos.aafwk.ability.AbilitySlice;
+import ohos.aafwk.content.Intent;
+import ohos.agp.components.Button;
+
+public class MainAbilitySlice extends AbilitySlice {
+ @Override
+ public void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setUIContent(ResourceTable.Layout_ability_main);
+ Button login = (Button) findComponentById(ResourceTable.Id_login_btn);
+ Button signup = (Button) findComponentById(ResourceTable.Id_signup_btn);
+ login.setClickedListener(List -> present(new Login(),new Intent()));
+ signup.setClickedListener(List -> present(new Signup(),new Intent()));
+ }
+
+ @Override
+ public void onActive() {
+ super.onActive();
+ }
+
+ @Override
+ public void onForeground(Intent intent) {
+ super.onForeground(intent);
+ }
+}
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Signup.java b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Signup.java
new file mode 100644
index 00000000..e24189ee
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Signup.java
@@ -0,0 +1,213 @@
+package com.example.assignment_app.slice;
+
+import com.example.assignment_app.ResourceTable;
+import ohos.aafwk.ability.AbilitySlice;
+import ohos.aafwk.content.Intent;
+import ohos.agp.components.*;
+import ohos.agp.window.dialog.ToastDialog;
+
+
+public class Signup extends AbilitySlice {
+ @Override
+ protected void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setUIContent(ResourceTable.Layout_signup);
+ TextField firstname = (TextField) findComponentById(ResourceTable.Id_firstname);
+ TextField lastname = (TextField) findComponentById(ResourceTable.Id_lastname);
+ TextField email = (TextField) findComponentById(ResourceTable.Id_email);
+ TextField password = (TextField) findComponentById(ResourceTable.Id_password);
+ TextField mobile = (TextField) findComponentById(ResourceTable.Id_mobile);
+ RadioButton male = (RadioButton) findComponentById(ResourceTable.Id_gender_male);
+ RadioButton female = (RadioButton) findComponentById(ResourceTable.Id_gender_female);
+ Button signup = (Button) findComponentById(ResourceTable.Id_signup_btn);
+ Text er1 = (Text) findComponentById(ResourceTable.Id_er1);
+ Text er2 = (Text) findComponentById(ResourceTable.Id_er2);
+ Text er3 = (Text) findComponentById(ResourceTable.Id_er3);
+ Text er4 = (Text) findComponentById(ResourceTable.Id_er4);
+ Text er5 = (Text) findComponentById(ResourceTable.Id_er5);
+ Text er6 = (Text) findComponentById(ResourceTable.Id_er6);
+
+ // All field cleared
+ firstname.setText("");
+ lastname.setText("");
+ email.setText("");
+ password.setText("");
+ mobile.setText("");
+ male.setChecked(false);
+ female.setChecked(false);
+ er1.setVisibility(Component.INVISIBLE);
+ er2.setVisibility(Component.INVISIBLE);
+ er3.setVisibility(Component.INVISIBLE);
+ er4.setVisibility(Component.INVISIBLE);
+ er5.setVisibility(Component.INVISIBLE);
+ er6.setVisibility(Component.INVISIBLE);
+
+ firstname.setFocusChangedListener((component, isFocused) -> {
+ String name = firstname.getText();
+ if (!isFocused) {
+ if (!name.matches(getString(ResourceTable.String_name_regex))) {
+
+ er1.setVisibility(Component.VISIBLE);
+ }
+ else
+ {
+ er1.setVisibility(Component.INVISIBLE);
+ }
+
+ }
+ });
+
+ male.setClickedListener(new Component.ClickedListener() {
+ @Override
+ public void onClick(Component component) {
+ female.setChecked(false);
+ }
+ });
+
+ female.setClickedListener(new Component.ClickedListener() {
+ @Override
+ public void onClick(Component component) {
+ male.setChecked(false);
+ }
+ });
+
+ lastname.setFocusChangedListener((component, isFocused) -> {
+ String name = lastname.getText();
+ if (!isFocused) {
+ if (!name.matches(getString(ResourceTable.String_name_regex))) {
+
+
+ er2.setVisibility(Component.VISIBLE);
+ }
+ else
+ {
+
+ er2.setVisibility(Component.INVISIBLE);
+ }
+
+ }
+ });
+
+
+ email.setFocusChangedListener((component, isFocused) -> {
+ String name = email.getText();
+ if (!isFocused) {
+ if (!name.matches(getString(ResourceTable.String_email_regex))) {
+
+ er3.setVisibility(Component.VISIBLE);
+ }
+ else
+ {
+
+ er3.setVisibility(Component.INVISIBLE);
+ }
+
+ }
+ });
+
+ password.setFocusChangedListener((component, isFocused) -> {
+ String name = password.getText();
+ if (!isFocused) {
+ if (!name.matches(getString(ResourceTable.String_pass_regex))) {
+
+ er4.setVisibility(Component.VISIBLE);
+ }
+ else
+ {
+
+ er4.setVisibility(Component.INVISIBLE);
+ }
+
+ }
+ });
+
+ mobile.setFocusChangedListener((component, isFocused) -> {
+ String name = mobile.getText();
+ if (!isFocused) {
+ if (!name.matches(getString(ResourceTable.String_mobile_regex))) {
+
+
+ er5.setVisibility(Component.VISIBLE);
+ }
+ else
+ {
+
+ er5.setVisibility(Component.INVISIBLE);
+ }
+
+ }
+ });
+
+
+ signup.setClickedListener(new Component.ClickedListener() {
+ @Override
+ public void onClick(Component component) {
+ if ((!male.isChecked()) && (!female.isChecked()) )
+ {
+ er6.setVisibility(Component.VISIBLE);
+ }
+ else
+ {
+ er6.setVisibility(Component.INVISIBLE);
+ }
+
+ // checking if focus was on some feild and signup btn pressed, verifying that data format
+ //
+ if (firstname.getText().matches(getString(ResourceTable.String_name_regex))) {
+ er1.setVisibility(Component.INVISIBLE);
+ }
+ else
+ {
+ er1.setVisibility(Component.VISIBLE);
+ }
+ if (lastname.getText().matches(getString(ResourceTable.String_name_regex))) {
+
+ er2.setVisibility(Component.INVISIBLE);
+ }else
+ {
+ er2.setVisibility(Component.VISIBLE);
+ }
+ if (email.getText().matches(getString(ResourceTable.String_email_regex))) {
+
+ er3.setVisibility(Component.INVISIBLE);
+ }else
+ {
+ er3.setVisibility(Component.VISIBLE);
+ }
+ if (password.getText().matches(getString(ResourceTable.String_pass_regex))) {
+
+ er4.setVisibility(Component.INVISIBLE);
+ }else
+ {
+ er4.setVisibility(Component.VISIBLE);
+ }
+ if (mobile.getText().matches(getString(ResourceTable.String_mobile_regex))) {
+
+ er5.setVisibility(Component.INVISIBLE);
+ }else
+ {
+ er5.setVisibility(Component.VISIBLE);
+ }
+
+
+ // Checking If anything empty
+
+ if(email.getText().equals("") || password.getText().equals("") || firstname.getText().equals("") || lastname.getText().equals("") || mobile.getText().equals(""))
+ {
+ new ToastDialog(getContext()).setText("Enter All Data").show();
+ //present(new Signup(), new Intent());
+ }
+ else if(er1.getVisibility()==0 || er2.getVisibility()==0 || er3.getVisibility()==0 || er4.getVisibility()==0 || er5.getVisibility()==0 || er6.getVisibility()==0)
+ {
+ new ToastDialog(getContext()).setText("Enter Correct data and gender").show();
+ }
+
+ else {
+ new ToastDialog(getContext()).setText("Verified").show();
+ present(new MainAbilitySlice(), new Intent());
+ }
+ }
+ });
+ }
+
+}
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/element/string.json b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/element/string.json
new file mode 100644
index 00000000..18fcdf58
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/element/string.json
@@ -0,0 +1,52 @@
+{
+ "string": [
+ {
+ "name": "app_name",
+ "value": "assignment_app"
+ },
+ {
+ "name": "mainability_description",
+ "value": "Java_Phone_Empty Feature Ability"
+ },
+ {
+ "name": "mainability_HelloWorld",
+ "value": "Hello World"
+ },
+ {
+ "name": "persondataability_description",
+ "value": "hap sample empty provider"
+ },
+ {
+ "name": "pass_regex",
+ "value": "^.{5,}$"
+ },
+ {
+ "name": "name_regex",
+ "value":"^[a-zA-Z]+$"
+ },
+ {
+ "name": "email_regex",
+ "value": "^[a-zA-Z0-9+_.-]+@[a-zA-Z0-9.-]+$"
+ },
+ {
+ "name": "mobile_regex",
+ "value": "^[0-9]{10}$"
+ },
+ {
+ "name": "alias",
+ "value": "Data"
+ },
+ {
+ "name": "db_name",
+ "value": "Data.db"
+ },
+ {
+ "name": "male",
+ "value": "Male"
+ },
+ {
+ "name": "female",
+ "value": "Female"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/graphic/background_ability_main.xml b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/graphic/background_ability_main.xml
new file mode 100644
index 00000000..c0c0a3df
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/graphic/background_ability_main.xml
@@ -0,0 +1,6 @@
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/ability_main.xml b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/ability_main.xml
new file mode 100644
index 00000000..8dc72320
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/ability_main.xml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/login.xml b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/login.xml
new file mode 100644
index 00000000..000405f7
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/login.xml
@@ -0,0 +1,14 @@
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/signup.xml b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/signup.xml
new file mode 100644
index 00000000..2756a80f
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/signup.xml
@@ -0,0 +1,222 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/media/email.png b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/media/email.png
new file mode 100644
index 00000000..a579780f
Binary files /dev/null and b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/media/email.png differ
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/media/icon.png b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/media/icon.png
new file mode 100644
index 00000000..ce307a88
Binary files /dev/null and b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/media/icon.png differ
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/ohosTest/config.json b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/ohosTest/config.json
new file mode 100644
index 00000000..df78b724
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/ohosTest/config.json
@@ -0,0 +1,41 @@
+{
+ "app": {
+ "bundleName": "com.example.assignment_app",
+ "vendor": "example",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ },
+ "apiVersion": {
+ "compatible": 4,
+ "target": 5,
+ "releaseType": "Release"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.example.assignment_app",
+ "name": "testModule",
+ "deviceType": [
+ "phone"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "entry_test",
+ "moduleType": "feature",
+ "installationFree": true
+ },
+ "abilities": [
+ {
+ "name": "decc.testkit.runner.EntryAbility",
+ "description": "Test Entry Ability",
+ "icon": "$media:icon",
+ "label": "$string:app_name",
+ "launchType": "standard",
+ "orientation": "landscape",
+ "visible": true,
+ "type": "page"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/ohosTest/java/com/example/assignment_app/ExampleOhosTest.java b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/ohosTest/java/com/example/assignment_app/ExampleOhosTest.java
new file mode 100644
index 00000000..63d3e103
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/ohosTest/java/com/example/assignment_app/ExampleOhosTest.java
@@ -0,0 +1,14 @@
+package com.example.assignment_app;
+
+import ohos.aafwk.ability.delegation.AbilityDelegatorRegistry;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+public class ExampleOhosTest {
+ @Test
+ public void testBundleName() {
+ final String actualBundleName = AbilityDelegatorRegistry.getArguments().getTestBundleName();
+ assertEquals("com.example.assignment_app", actualBundleName);
+ }
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/test/java/com/example/assignment_app/ExampleTest.java b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/test/java/com/example/assignment_app/ExampleTest.java
new file mode 100644
index 00000000..154924d0
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/entry/src/test/java/com/example/assignment_app/ExampleTest.java
@@ -0,0 +1,9 @@
+package com.example.assignment_app;
+
+import org.junit.Test;
+
+public class ExampleTest {
+ @Test
+ public void onStart() {
+ }
+}
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/gradle.properties b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/gradle.properties
new file mode 100644
index 00000000..0daf1830
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/gradle.properties
@@ -0,0 +1,10 @@
+# Project-wide Gradle settings.
+# IDE (e.g. DevEco Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+# If the Chinese output is garbled, please configure the following parameter.
+# org.gradle.jvmargs=-Dfile.encoding=GBK
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/gradle/wrapper/gradle-wrapper.jar b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 00000000..490fda85
Binary files /dev/null and b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/gradle/wrapper/gradle-wrapper.properties b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000..f59159e8
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://repo.huaweicloud.com/gradle/gradle-6.3-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/gradlew b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/gradlew
new file mode 100644
index 00000000..2fe81a7d
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/gradlew
@@ -0,0 +1,183 @@
+#!/usr/bin/env sh
+
+#
+# Copyright 2015 the original author or authors.
+#
+# 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
+#
+# https://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.
+#
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=`expr $i + 1`
+ done
+ case $i in
+ 0) set -- ;;
+ 1) set -- "$args0" ;;
+ 2) set -- "$args0" "$args1" ;;
+ 3) set -- "$args0" "$args1" "$args2" ;;
+ 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=`save "$@"`
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+exec "$JAVACMD" "$@"
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/gradlew.bat b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/gradlew.bat
new file mode 100644
index 00000000..62bd9b9c
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/gradlew.bat
@@ -0,0 +1,103 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/settings.gradle b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/settings.gradle
new file mode 100644
index 00000000..4773db73
--- /dev/null
+++ b/HarmonyOS/Day2 Assingment/Alpesh/assignment_app/settings.gradle
@@ -0,0 +1 @@
+include ':entry'
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.gitignore b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.gitignore
new file mode 100644
index 00000000..37a4eb8b
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.gitignore
@@ -0,0 +1,15 @@
+*.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
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.idea/.gitignore b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.idea/.gitignore
new file mode 100644
index 00000000..26d33521
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.idea/compiler.xml b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.idea/compiler.xml
new file mode 100644
index 00000000..61a9130c
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.idea/compiler.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.idea/gradle.xml b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.idea/gradle.xml
new file mode 100644
index 00000000..b9090f42
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.idea/gradle.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.idea/jarRepositories.xml b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.idea/jarRepositories.xml
new file mode 100644
index 00000000..1dfcd020
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.idea/jarRepositories.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.idea/misc.xml b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.idea/misc.xml
new file mode 100644
index 00000000..58918f50
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.idea/previewer/phone/phoneSettingConfig_-925978332.json b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.idea/previewer/phone/phoneSettingConfig_-925978332.json
new file mode 100644
index 00000000..f505e6b9
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.idea/previewer/phone/phoneSettingConfig_-925978332.json
@@ -0,0 +1,25 @@
+{
+ "setting": {
+ "1.0.1": {
+ "Language": {
+ "args": {
+ "Language": "zh-CN"
+ }
+ }
+ }
+ },
+ "frontend": {
+ "1.0.0": {
+ "Resolution": {
+ "args": {
+ "Resolution": "360*780"
+ }
+ },
+ "DeviceType": {
+ "args": {
+ "DeviceType": "phone"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.idea/previewer/previewConfig.json b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.idea/previewer/previewConfig.json
new file mode 100644
index 00000000..ae1b07b4
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.idea/previewer/previewConfig.json
@@ -0,0 +1,9 @@
+{
+ "1.0.0": {
+ "LastPreviewDevice": {
+ "C:\\Users\\lucifer\\DevEcoStudioProjects\\assignment_app\\entry": [
+ "phone"
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.idea/vcs.xml b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.idea/vcs.xml
new file mode 100644
index 00000000..4fce1d86
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/build.gradle b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/build.gradle
new file mode 100644
index 00000000..9ec29b00
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/build.gradle
@@ -0,0 +1,37 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+apply plugin: 'com.huawei.ohos.app'
+
+ohos {
+ compileSdkVersion 5
+ defaultConfig {
+ compatibleSdkVersion 4
+ }
+}
+
+buildscript {
+ repositories {
+ maven {
+ url 'https://repo.huaweicloud.com/repository/maven/'
+ }
+ maven {
+ url 'https://developer.huawei.com/repo/'
+ }
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.huawei.ohos:hap:2.4.2.7'
+ classpath 'com.huawei.ohos:decctest:1.0.0.7'
+ }
+}
+
+allprojects {
+ repositories {
+ maven {
+ url 'https://repo.huaweicloud.com/repository/maven/'
+ }
+ maven {
+ url 'https://developer.huawei.com/repo/'
+ }
+ jcenter()
+ }
+}
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/.gitignore b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/.gitignore
new file mode 100644
index 00000000..796b96d1
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/build.gradle b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/build.gradle
new file mode 100644
index 00000000..283e17ef
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/build.gradle
@@ -0,0 +1,28 @@
+apply plugin: 'com.huawei.ohos.hap'
+apply plugin: 'com.huawei.ohos.decctest'
+ohos {
+ compileSdkVersion 5
+ defaultConfig {
+ compatibleSdkVersion 4
+ }
+ buildTypes {
+ release {
+ proguardOpt {
+ proguardEnabled false
+ rulesFiles 'proguard-rules.pro'
+ }
+ }
+ }
+ compileOptions{
+ annotationEnabled true
+ }
+}
+
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
+ testImplementation 'junit:junit:4.13'
+ ohosTestImplementation 'com.huawei.ohos.testkit:runner:1.0.0.100'
+}
+decc {
+ supportType = ['html','xml']
+}
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/proguard-rules.pro b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/proguard-rules.pro
new file mode 100644
index 00000000..f7666e47
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/proguard-rules.pro
@@ -0,0 +1 @@
+# config module specific ProGuard rules here.
\ No newline at end of file
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/config.json b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/config.json
new file mode 100644
index 00000000..1375b2a7
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/config.json
@@ -0,0 +1,49 @@
+{
+ "app": {
+ "bundleName": "com.example.assignment_app",
+ "vendor": "example",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ },
+ "apiVersion": {
+ "compatible": 4,
+ "target": 5,
+ "releaseType": "Release"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.example.assignment_app",
+ "name": ".MyApplication",
+ "deviceType": [
+ "phone"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "entry",
+ "moduleType": "entry"
+ },
+ "abilities": [
+ {
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ],
+ "orientation": "unspecified",
+ "name": "com.example.assignment_app.MainAbility",
+ "icon": "$media:icon",
+ "description": "$string:mainability_description",
+ "label": "$string:app_name",
+ "type": "page",
+ "launchType": "standard"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/Data.java b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/Data.java
new file mode 100644
index 00000000..783229a8
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/Data.java
@@ -0,0 +1,8 @@
+package com.example.assignment_app;
+
+import ohos.data.orm.OrmDatabase;;
+import ohos.data.orm.annotation.Database;
+
+@Database(entities = {User.class}, version = 1)
+public abstract class Data extends OrmDatabase {
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/MainAbility.java b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/MainAbility.java
new file mode 100644
index 00000000..8346e010
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/MainAbility.java
@@ -0,0 +1,13 @@
+package com.example.assignment_app;
+
+import com.example.assignment_app.slice.MainAbilitySlice;
+import ohos.aafwk.ability.Ability;
+import ohos.aafwk.content.Intent;
+
+public class MainAbility extends Ability {
+ @Override
+ public void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setMainRoute(MainAbilitySlice.class.getName());
+ }
+}
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/MyApplication.java b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/MyApplication.java
new file mode 100644
index 00000000..d9b5646c
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/MyApplication.java
@@ -0,0 +1,10 @@
+package com.example.assignment_app;
+
+import ohos.aafwk.ability.AbilityPackage;
+
+public class MyApplication extends AbilityPackage {
+ @Override
+ public void onInitialize() {
+ super.onInitialize();
+ }
+}
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/User.java b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/User.java
new file mode 100644
index 00000000..9018bfad
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/User.java
@@ -0,0 +1,78 @@
+package com.example.assignment_app;
+
+import ohos.data.orm.OrmObject;
+import ohos.data.orm.annotation.Entity;
+import ohos.data.orm.annotation.Index;
+import ohos.data.orm.annotation.PrimaryKey;
+
+@Entity(tableName = "Data", indices = {@Index(value = {"DB_COLUMN_EMAIL"}, name = "name_index", unique = true)})
+public class User extends OrmObject {
+ // Set the userId to the auto-generated primary key. Note that the auto-generated primary key takes effect only when the data type is a wrapper class.
+ @PrimaryKey(autoGenerate = true)
+ private Integer DB_COLUMN_PERSON_ID;
+ private String DB_COLUMN_LAST_NAME;
+ private String DB_COLUMN_FIRST_NAME;
+ private String DB_COLUMN_GENDER;
+ private String DB_COLUMN_MOBILE;
+ private String DB_COLUMN_EMAIL;
+ private String DB_COLUMN_PASSWORD;
+
+ public Integer getDB_COLUMN_PERSON_ID() {
+ return DB_COLUMN_PERSON_ID;
+ }
+
+ public void setDB_COLUMN_PERSON_ID(Integer DB_COLUMN_PERSON_ID) {
+ this.DB_COLUMN_PERSON_ID = DB_COLUMN_PERSON_ID;
+ }
+
+ public String getDB_COLUMN_FIRST_NAME() {
+ return DB_COLUMN_FIRST_NAME;
+ }
+
+ public void setDB_COLUMN_FIRST_NAME(String DB_COLUMN_FIRST_NAME) {
+ this.DB_COLUMN_FIRST_NAME = DB_COLUMN_FIRST_NAME;
+ }
+
+ public String getDB_COLUMN_LAST_NAME() {
+ return DB_COLUMN_LAST_NAME;
+ }
+
+ public void setDB_COLUMN_LAST_NAME(String DB_COLUMN_LAST_NAME) {
+ this.DB_COLUMN_LAST_NAME = DB_COLUMN_LAST_NAME;
+ }
+
+ public String getDB_COLUMN_GENDER() {
+ return DB_COLUMN_GENDER;
+ }
+
+ public void setDB_COLUMN_GENDER(String DB_COLUMN_GENDER) {
+ this.DB_COLUMN_GENDER = DB_COLUMN_GENDER;
+ }
+
+ public String getDB_COLUMN_MOBILE() {
+ return DB_COLUMN_MOBILE;
+ }
+
+ public void setDB_COLUMN_MOBILE(String DB_COLUMN_MOBILE) {
+ this.DB_COLUMN_MOBILE = DB_COLUMN_MOBILE;
+ }
+
+ public String getDB_COLUMN_EMAIL() {
+ return DB_COLUMN_EMAIL;
+ }
+
+ public void setDB_COLUMN_EMAIL(String DB_COLUMN_EMAIL) {
+ this.DB_COLUMN_EMAIL = DB_COLUMN_EMAIL;
+ }
+
+ public String getDB_COLUMN_PASSWORD() {
+ return DB_COLUMN_PASSWORD;
+ }
+
+ public void setDB_COLUMN_PASSWORD(String DB_COLUMN_PASSWORD) {
+ this.DB_COLUMN_PASSWORD = DB_COLUMN_PASSWORD;
+ }
+
+
+ // Add the getter and setter methods.
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Dashboard.java b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Dashboard.java
new file mode 100644
index 00000000..5e2f8b49
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Dashboard.java
@@ -0,0 +1,16 @@
+package com.example.assignment_app.slice;
+
+import com.example.assignment_app.ResourceTable;
+import ohos.aafwk.ability.AbilitySlice;
+import ohos.aafwk.content.Intent;
+import ohos.agp.components.Button;
+
+public class Dashboard extends AbilitySlice {
+ @Override
+ protected void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setUIContent(ResourceTable.Layout_dashboard);
+ Button logout = (Button) findComponentById(ResourceTable.Id_logout_btn);
+ logout.setClickedListener(List -> present(new MainAbilitySlice(),new Intent()));
+ }
+}
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Login.java b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Login.java
new file mode 100644
index 00000000..726435ca
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Login.java
@@ -0,0 +1,68 @@
+package com.example.assignment_app.slice;
+
+import com.example.assignment_app.Data;
+import com.example.assignment_app.ResourceTable;
+import com.example.assignment_app.User;
+import ohos.aafwk.ability.AbilitySlice;
+import ohos.aafwk.content.Intent;
+import ohos.agp.components.Button;
+import ohos.agp.components.Component;
+import ohos.agp.components.TextField;
+import ohos.agp.window.dialog.ToastDialog;
+import ohos.data.DatabaseHelper;
+import ohos.data.orm.OrmContext;
+import ohos.data.orm.OrmPredicates;
+
+import java.util.List;
+
+public class Login extends AbilitySlice {
+ @Override
+ protected void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setUIContent(ResourceTable.Layout_login);
+ TextField email = (TextField) findComponentById(ResourceTable.Id_email_);
+ TextField password = (TextField) findComponentById(ResourceTable.Id_password_);
+ email.setText("");
+ password.setText("");
+ Button login = (Button) findComponentById(ResourceTable.Id_login_btn);
+ DatabaseHelper helper = new DatabaseHelper(Login.this);
+ OrmContext context = helper.getOrmContext(getString(ResourceTable.String_alias), getString(ResourceTable.String_db_name), Data.class);
+ Button signup = (Button) findComponentById(ResourceTable.Id_signup_btn);
+ signup.setClickedListener(List -> present(new Signup(),new Intent()));
+ login.setClickedListener(new Component.ClickedListener() {
+ @Override
+ public void onClick(Component component) {
+ if (email.getText().equals("") || password.getText().equals(""))
+ {
+ new ToastDialog(getContext()).setText(getString(ResourceTable.String_feild)).show();
+ }
+ else
+ {
+ OrmPredicates query = context.where(User.class).equalTo("DB_COLUMN_EMAIL", email.getText());
+ try {
+ List users = context.query(query);
+ if (users.size()!=0 && password.getText().equals(users.get(0).getDB_COLUMN_PASSWORD()))
+ {
+ new ToastDialog(getContext()).setText("Login Success").show();
+ present(new Dashboard(),new Intent());
+ }
+ else if (users.size()!=0)
+ {
+ new ToastDialog(getContext()).setText(getString(ResourceTable.String_wrong_pass)).show();
+ }
+ else
+ {
+ new ToastDialog(getContext()).setText(getString(ResourceTable.String_not_registered)).show();
+ }
+ }
+ catch (Exception e)
+ {
+ new ToastDialog(getContext()).setText(getString(ResourceTable.String_wrong_email_pass)).show();
+ }
+ }
+
+ }
+ });
+
+ }
+}
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/MainAbilitySlice.java b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/MainAbilitySlice.java
new file mode 100644
index 00000000..7e518788
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/MainAbilitySlice.java
@@ -0,0 +1,28 @@
+package com.example.assignment_app.slice;
+
+import com.example.assignment_app.ResourceTable;
+import ohos.aafwk.ability.AbilitySlice;
+import ohos.aafwk.content.Intent;
+import ohos.agp.components.Button;
+
+public class MainAbilitySlice extends AbilitySlice {
+ @Override
+ public void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setUIContent(ResourceTable.Layout_ability_main);
+ Button login = (Button) findComponentById(ResourceTable.Id_login_btn);
+ Button signup = (Button) findComponentById(ResourceTable.Id_signup_btn);
+ login.setClickedListener(List -> present(new Login(),new Intent()));
+ signup.setClickedListener(List -> present(new Signup(),new Intent()));
+ }
+
+ @Override
+ public void onActive() {
+ super.onActive();
+ }
+
+ @Override
+ public void onForeground(Intent intent) {
+ super.onForeground(intent);
+ }
+}
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Signup.java b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Signup.java
new file mode 100644
index 00000000..6e50bfae
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Signup.java
@@ -0,0 +1,261 @@
+package com.example.assignment_app.slice;
+
+import com.example.assignment_app.Data;
+import com.example.assignment_app.ResourceTable;
+import com.example.assignment_app.User;
+import ohos.aafwk.ability.AbilitySlice;
+import ohos.aafwk.content.Intent;
+import ohos.agp.components.*;
+import ohos.agp.window.dialog.ToastDialog;
+import ohos.data.DatabaseHelper;
+import ohos.data.orm.OrmContext;
+import ohos.data.orm.OrmPredicates;
+import ohos.hiviewdfx.HiLogLabel;
+
+import java.util.List;
+
+
+public class Signup extends AbilitySlice {
+
+ private static final HiLogLabel LABEL_LOG = new HiLogLabel(3, 0xD001100, "MainAbilitySlice");
+
+
+ @Override
+ protected void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setUIContent(ResourceTable.Layout_signup);
+ TextField firstname = (TextField) findComponentById(ResourceTable.Id_firstname);
+ TextField lastname = (TextField) findComponentById(ResourceTable.Id_lastname);
+ TextField email = (TextField) findComponentById(ResourceTable.Id_email);
+ TextField password = (TextField) findComponentById(ResourceTable.Id_password);
+ TextField mobile = (TextField) findComponentById(ResourceTable.Id_mobile);
+ RadioButton male = (RadioButton) findComponentById(ResourceTable.Id_gender_male);
+ RadioButton female = (RadioButton) findComponentById(ResourceTable.Id_gender_female);
+ Button signup = (Button) findComponentById(ResourceTable.Id_signup_btn);
+ Button login = (Button) findComponentById(ResourceTable.Id_login_btn);
+ Text er1 = (Text) findComponentById(ResourceTable.Id_er1);
+ Text er2 = (Text) findComponentById(ResourceTable.Id_er2);
+ Text er3 = (Text) findComponentById(ResourceTable.Id_er3);
+ Text er4 = (Text) findComponentById(ResourceTable.Id_er4);
+ Text er5 = (Text) findComponentById(ResourceTable.Id_er5);
+ Text er6 = (Text) findComponentById(ResourceTable.Id_er6);
+
+ // All field cleared
+ firstname.setText("");
+ lastname.setText("");
+ email.setText("");
+ password.setText("");
+ mobile.setText("");
+ male.setChecked(false);
+ female.setChecked(false);
+ er1.setVisibility(Component.INVISIBLE);
+ er2.setVisibility(Component.INVISIBLE);
+ er3.setVisibility(Component.INVISIBLE);
+ er4.setVisibility(Component.INVISIBLE);
+ er5.setVisibility(Component.INVISIBLE);
+ er6.setVisibility(Component.INVISIBLE);
+
+ DatabaseHelper helper = new DatabaseHelper(Signup.this);
+ OrmContext context = helper.getOrmContext(getString(ResourceTable.String_alias), getString(ResourceTable.String_db_name), Data.class);
+ User user = new User();
+ firstname.setFocusChangedListener((component, isFocused) -> {
+ String name = firstname.getText();
+ if (!isFocused) {
+ if (!name.matches(getString(ResourceTable.String_name_regex))) {
+
+ er1.setVisibility(Component.VISIBLE);
+ }
+ else
+ {
+ er1.setVisibility(Component.INVISIBLE);
+ }
+
+ }
+ });
+
+ male.setClickedListener(new Component.ClickedListener() {
+ @Override
+ public void onClick(Component component) {
+ female.setChecked(false);
+ }
+ });
+
+ female.setClickedListener(new Component.ClickedListener() {
+ @Override
+ public void onClick(Component component) {
+ male.setChecked(false);
+ }
+ });
+
+ lastname.setFocusChangedListener((component, isFocused) -> {
+ String name = lastname.getText();
+ if (!isFocused) {
+ if (!name.matches(getString(ResourceTable.String_name_regex))) {
+
+
+ er2.setVisibility(Component.VISIBLE);
+ }
+ else
+ {
+
+ er2.setVisibility(Component.INVISIBLE);
+ }
+
+ }
+ });
+
+
+ email.setFocusChangedListener((component, isFocused) -> {
+ String name = email.getText();
+ if (!isFocused) {
+ if (!name.matches(getString(ResourceTable.String_email_regex))) {
+
+ er3.setVisibility(Component.VISIBLE);
+ }
+ else
+ {
+
+ er3.setVisibility(Component.INVISIBLE);
+ }
+
+ }
+ });
+
+ password.setFocusChangedListener((component, isFocused) -> {
+ String name = password.getText();
+ if (!isFocused) {
+ if (!name.matches(getString(ResourceTable.String_pass_regex))) {
+
+ er4.setVisibility(Component.VISIBLE);
+ }
+ else
+ {
+
+ er4.setVisibility(Component.INVISIBLE);
+ }
+
+ }
+ });
+
+ mobile.setFocusChangedListener((component, isFocused) -> {
+ String name = mobile.getText();
+ if (!isFocused) {
+ if (!name.matches(getString(ResourceTable.String_mobile_regex))) {
+
+
+ er5.setVisibility(Component.VISIBLE);
+ }
+ else
+ {
+
+ er5.setVisibility(Component.INVISIBLE);
+ }
+
+ }
+ });
+
+
+ login.setClickedListener(List -> present(new Login(),new Intent()));
+
+ signup.setClickedListener(new Component.ClickedListener() {
+ @Override
+ public void onClick(Component component) {
+ if ((!male.isChecked()) && (!female.isChecked()) )
+ {
+ er6.setVisibility(Component.VISIBLE);
+ }
+ else
+ {
+ er6.setVisibility(Component.INVISIBLE);
+ }
+
+ // checking if focus was on some feild and signup btn pressed, verifying that data format
+ //
+ if (firstname.getText().matches(getString(ResourceTable.String_name_regex))) {
+ er1.setVisibility(Component.INVISIBLE);
+ }
+ else
+ {
+ er1.setVisibility(Component.VISIBLE);
+ }
+ if (lastname.getText().matches(getString(ResourceTable.String_name_regex))) {
+
+ er2.setVisibility(Component.INVISIBLE);
+ }else
+ {
+ er2.setVisibility(Component.VISIBLE);
+ }
+ if (email.getText().matches(getString(ResourceTable.String_email_regex))) {
+
+ er3.setVisibility(Component.INVISIBLE);
+ }else
+ {
+ er3.setVisibility(Component.VISIBLE);
+ }
+ if (password.getText().matches(getString(ResourceTable.String_pass_regex))) {
+
+ er4.setVisibility(Component.INVISIBLE);
+ }else
+ {
+ er4.setVisibility(Component.VISIBLE);
+ }
+ if (mobile.getText().matches(getString(ResourceTable.String_mobile_regex))) {
+
+ er5.setVisibility(Component.INVISIBLE);
+ }else
+ {
+ er5.setVisibility(Component.VISIBLE);
+ }
+
+
+ // Checking If anything empty
+
+ if(email.getText().equals("") || password.getText().equals("") || firstname.getText().equals("") || lastname.getText().equals("") || mobile.getText().equals(""))
+ {
+ new ToastDialog(getContext()).setText(getString(ResourceTable.String_feild)).show();
+ //present(new Signup(), new Intent());
+ }
+ else if(er1.getVisibility()==0 || er2.getVisibility()==0 || er3.getVisibility()==0 || er4.getVisibility()==0 || er5.getVisibility()==0 || er6.getVisibility()==0)
+ {
+ new ToastDialog(getContext()).setText(getString(ResourceTable.String_correct_data)).show();
+ }
+
+ else {
+ OrmPredicates query = context.where(User.class).equalTo("DB_COLUMN_EMAIL", email.getText());
+ List users = context.query(query);
+ if (users.size() == 0) {
+
+ user.setDB_COLUMN_FIRST_NAME(firstname.getText());
+ if (male.isChecked()) {
+ user.setDB_COLUMN_GENDER(getString(ResourceTable.String_male));
+
+ }
+ else {
+ user.setDB_COLUMN_GENDER(getString(ResourceTable.String_female));
+ }
+ user.setDB_COLUMN_PASSWORD(password.getText());
+ user.setDB_COLUMN_LAST_NAME(lastname.getText());
+ user.setDB_COLUMN_MOBILE(mobile.getText());
+ user.setDB_COLUMN_EMAIL(email.getText());
+ try {
+ boolean isSuccessed = context.insert(user);
+ isSuccessed = context.flush();
+ //present(new MainAbilitySlice(), new Intent());
+ new ToastDialog(getContext()).setText("Success").show();
+ present(new MainAbilitySlice(),new Intent());
+ } catch (Exception e) {
+ new ToastDialog(getContext()).setText("Used Email").show();
+ email.setText("");
+ //present(new Signup(), new Intent());
+ }
+ } else {
+ new ToastDialog(getContext()).setText("Email used").show();
+ email.setText("");
+ //present(new MainAbilitySlice(), new Intent());
+ }
+ }
+ }
+ });
+ }
+
+}
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/resources/base/element/string.json b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/resources/base/element/string.json
new file mode 100644
index 00000000..5774f8e9
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/resources/base/element/string.json
@@ -0,0 +1,104 @@
+{
+ "string": [
+ {
+ "name": "app_name",
+ "value": "assignment_app"
+ },
+ {
+ "name": "mainability_description",
+ "value": "Java_Phone_Empty Feature Ability"
+ },
+ {
+ "name": "mainability_HelloWorld",
+ "value": "YOLO"
+ },
+ {
+ "name": "persondataability_description",
+ "value": "hap sample empty provider"
+ },
+ {
+ "name": "pass_regex",
+ "value": "^.{5,}$"
+ },
+ {
+ "name": "name_regex",
+ "value":"^[a-zA-Z]+$"
+ },
+ {
+ "name": "email_regex",
+ "value": "^[a-zA-Z0-9+_.-]+@[a-zA-Z0-9.-]+$"
+ },
+ {
+ "name": "mobile_regex",
+ "value": "^[0-9]{10}$"
+ },
+ {
+ "name": "alias",
+ "value": "Data"
+ },
+ {
+ "name": "db_name",
+ "value": "Data.db"
+ },
+ {
+ "name": "male",
+ "value": "Male"
+ },
+ {
+ "name": "female",
+ "value": "Female"
+ },
+ {
+ "name": "yes",
+ "value": "Yes"
+ },
+ {
+ "name": "no",
+ "value": "No"
+ },
+ {
+ "name": "error_toast",
+ "value": "Email or Password did not matched"
+ },
+ {
+ "name": "em",
+ "value": "em"
+ },
+ {
+ "name": "pas",
+ "value": "pas"
+ },
+ {
+ "name": "feild",
+ "value": "Enter All feilds"
+ },
+ {
+ "name": "not_registered",
+ "value": "Email not registred"
+ },
+ {
+ "name": "dialog_text",
+ "value": "Go to Login page to enter the app?"
+ },
+ {
+ "name": "dialog_title",
+ "value": "Please Verify"
+ },
+ {
+ "name": "dialog_no_click",
+ "value":"Clicked No button"
+ },
+ {
+ "name": "correct_data",
+ "value": "Enter Correct data and gender"
+ },
+ {
+ "name": "wrong_pass",
+ "value": "Wrong password"
+ },
+ {
+ "name": "wrong_email_pass",
+ "value": "Wrong email/password"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/resources/base/graphic/background_ability_main.xml b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/resources/base/graphic/background_ability_main.xml
new file mode 100644
index 00000000..c0c0a3df
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/resources/base/graphic/background_ability_main.xml
@@ -0,0 +1,6 @@
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/resources/base/layout/ability_main.xml b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/resources/base/layout/ability_main.xml
new file mode 100644
index 00000000..8dc72320
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/resources/base/layout/ability_main.xml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/resources/base/layout/dashboard.xml b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/resources/base/layout/dashboard.xml
new file mode 100644
index 00000000..0cb996f9
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/resources/base/layout/dashboard.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/resources/base/layout/login.xml b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/resources/base/layout/login.xml
new file mode 100644
index 00000000..bd55b9a0
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/resources/base/layout/login.xml
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/resources/base/layout/signup.xml b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/resources/base/layout/signup.xml
new file mode 100644
index 00000000..d73dd141
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/resources/base/layout/signup.xml
@@ -0,0 +1,238 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/resources/base/media/email.png b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/resources/base/media/email.png
new file mode 100644
index 00000000..a579780f
Binary files /dev/null and b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/resources/base/media/email.png differ
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/resources/base/media/icon.png b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/resources/base/media/icon.png
new file mode 100644
index 00000000..ce307a88
Binary files /dev/null and b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/main/resources/base/media/icon.png differ
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/ohosTest/config.json b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/ohosTest/config.json
new file mode 100644
index 00000000..df78b724
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/ohosTest/config.json
@@ -0,0 +1,41 @@
+{
+ "app": {
+ "bundleName": "com.example.assignment_app",
+ "vendor": "example",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ },
+ "apiVersion": {
+ "compatible": 4,
+ "target": 5,
+ "releaseType": "Release"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.example.assignment_app",
+ "name": "testModule",
+ "deviceType": [
+ "phone"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "entry_test",
+ "moduleType": "feature",
+ "installationFree": true
+ },
+ "abilities": [
+ {
+ "name": "decc.testkit.runner.EntryAbility",
+ "description": "Test Entry Ability",
+ "icon": "$media:icon",
+ "label": "$string:app_name",
+ "launchType": "standard",
+ "orientation": "landscape",
+ "visible": true,
+ "type": "page"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/ohosTest/java/com/example/assignment_app/ExampleOhosTest.java b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/ohosTest/java/com/example/assignment_app/ExampleOhosTest.java
new file mode 100644
index 00000000..63d3e103
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/ohosTest/java/com/example/assignment_app/ExampleOhosTest.java
@@ -0,0 +1,14 @@
+package com.example.assignment_app;
+
+import ohos.aafwk.ability.delegation.AbilityDelegatorRegistry;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+public class ExampleOhosTest {
+ @Test
+ public void testBundleName() {
+ final String actualBundleName = AbilityDelegatorRegistry.getArguments().getTestBundleName();
+ assertEquals("com.example.assignment_app", actualBundleName);
+ }
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/test/java/com/example/assignment_app/ExampleTest.java b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/test/java/com/example/assignment_app/ExampleTest.java
new file mode 100644
index 00000000..154924d0
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/entry/src/test/java/com/example/assignment_app/ExampleTest.java
@@ -0,0 +1,9 @@
+package com.example.assignment_app;
+
+import org.junit.Test;
+
+public class ExampleTest {
+ @Test
+ public void onStart() {
+ }
+}
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/gradle.properties b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/gradle.properties
new file mode 100644
index 00000000..0daf1830
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/gradle.properties
@@ -0,0 +1,10 @@
+# Project-wide Gradle settings.
+# IDE (e.g. DevEco Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+# If the Chinese output is garbled, please configure the following parameter.
+# org.gradle.jvmargs=-Dfile.encoding=GBK
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/gradle/wrapper/gradle-wrapper.jar b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 00000000..490fda85
Binary files /dev/null and b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/gradle/wrapper/gradle-wrapper.properties b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000..f59159e8
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://repo.huaweicloud.com/gradle/gradle-6.3-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/gradlew b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/gradlew
new file mode 100644
index 00000000..2fe81a7d
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/gradlew
@@ -0,0 +1,183 @@
+#!/usr/bin/env sh
+
+#
+# Copyright 2015 the original author or authors.
+#
+# 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
+#
+# https://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.
+#
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=`expr $i + 1`
+ done
+ case $i in
+ 0) set -- ;;
+ 1) set -- "$args0" ;;
+ 2) set -- "$args0" "$args1" ;;
+ 3) set -- "$args0" "$args1" "$args2" ;;
+ 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=`save "$@"`
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+exec "$JAVACMD" "$@"
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/gradlew.bat b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/gradlew.bat
new file mode 100644
index 00000000..62bd9b9c
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/gradlew.bat
@@ -0,0 +1,103 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/HarmonyOS/Day3 Assingment/alpesh/assignment_app/settings.gradle b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/settings.gradle
new file mode 100644
index 00000000..4773db73
--- /dev/null
+++ b/HarmonyOS/Day3 Assingment/alpesh/assignment_app/settings.gradle
@@ -0,0 +1 @@
+include ':entry'
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.gitignore b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.gitignore
new file mode 100644
index 00000000..37a4eb8b
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.gitignore
@@ -0,0 +1,15 @@
+*.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
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.idea/.gitignore b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.idea/.gitignore
new file mode 100644
index 00000000..26d33521
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.idea/compiler.xml b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.idea/compiler.xml
new file mode 100644
index 00000000..61a9130c
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.idea/compiler.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.idea/gradle.xml b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.idea/gradle.xml
new file mode 100644
index 00000000..b9090f42
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.idea/gradle.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.idea/jarRepositories.xml b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.idea/jarRepositories.xml
new file mode 100644
index 00000000..1dfcd020
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.idea/jarRepositories.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.idea/misc.xml b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.idea/misc.xml
new file mode 100644
index 00000000..58918f50
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.idea/previewer/phone/phoneSettingConfig_-925978332.json b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.idea/previewer/phone/phoneSettingConfig_-925978332.json
new file mode 100644
index 00000000..f505e6b9
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.idea/previewer/phone/phoneSettingConfig_-925978332.json
@@ -0,0 +1,25 @@
+{
+ "setting": {
+ "1.0.1": {
+ "Language": {
+ "args": {
+ "Language": "zh-CN"
+ }
+ }
+ }
+ },
+ "frontend": {
+ "1.0.0": {
+ "Resolution": {
+ "args": {
+ "Resolution": "360*780"
+ }
+ },
+ "DeviceType": {
+ "args": {
+ "DeviceType": "phone"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.idea/previewer/previewConfig.json b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.idea/previewer/previewConfig.json
new file mode 100644
index 00000000..ae1b07b4
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.idea/previewer/previewConfig.json
@@ -0,0 +1,9 @@
+{
+ "1.0.0": {
+ "LastPreviewDevice": {
+ "C:\\Users\\lucifer\\DevEcoStudioProjects\\assignment_app\\entry": [
+ "phone"
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.idea/vcs.xml b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.idea/vcs.xml
new file mode 100644
index 00000000..4fce1d86
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/build.gradle b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/build.gradle
new file mode 100644
index 00000000..9ec29b00
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/build.gradle
@@ -0,0 +1,37 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+apply plugin: 'com.huawei.ohos.app'
+
+ohos {
+ compileSdkVersion 5
+ defaultConfig {
+ compatibleSdkVersion 4
+ }
+}
+
+buildscript {
+ repositories {
+ maven {
+ url 'https://repo.huaweicloud.com/repository/maven/'
+ }
+ maven {
+ url 'https://developer.huawei.com/repo/'
+ }
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.huawei.ohos:hap:2.4.2.7'
+ classpath 'com.huawei.ohos:decctest:1.0.0.7'
+ }
+}
+
+allprojects {
+ repositories {
+ maven {
+ url 'https://repo.huaweicloud.com/repository/maven/'
+ }
+ maven {
+ url 'https://developer.huawei.com/repo/'
+ }
+ jcenter()
+ }
+}
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/.gitignore b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/.gitignore
new file mode 100644
index 00000000..796b96d1
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/build.gradle b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/build.gradle
new file mode 100644
index 00000000..283e17ef
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/build.gradle
@@ -0,0 +1,28 @@
+apply plugin: 'com.huawei.ohos.hap'
+apply plugin: 'com.huawei.ohos.decctest'
+ohos {
+ compileSdkVersion 5
+ defaultConfig {
+ compatibleSdkVersion 4
+ }
+ buildTypes {
+ release {
+ proguardOpt {
+ proguardEnabled false
+ rulesFiles 'proguard-rules.pro'
+ }
+ }
+ }
+ compileOptions{
+ annotationEnabled true
+ }
+}
+
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
+ testImplementation 'junit:junit:4.13'
+ ohosTestImplementation 'com.huawei.ohos.testkit:runner:1.0.0.100'
+}
+decc {
+ supportType = ['html','xml']
+}
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/proguard-rules.pro b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/proguard-rules.pro
new file mode 100644
index 00000000..f7666e47
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/proguard-rules.pro
@@ -0,0 +1 @@
+# config module specific ProGuard rules here.
\ No newline at end of file
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/config.json b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/config.json
new file mode 100644
index 00000000..1375b2a7
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/config.json
@@ -0,0 +1,49 @@
+{
+ "app": {
+ "bundleName": "com.example.assignment_app",
+ "vendor": "example",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ },
+ "apiVersion": {
+ "compatible": 4,
+ "target": 5,
+ "releaseType": "Release"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.example.assignment_app",
+ "name": ".MyApplication",
+ "deviceType": [
+ "phone"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "entry",
+ "moduleType": "entry"
+ },
+ "abilities": [
+ {
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ],
+ "orientation": "unspecified",
+ "name": "com.example.assignment_app.MainAbility",
+ "icon": "$media:icon",
+ "description": "$string:mainability_description",
+ "label": "$string:app_name",
+ "type": "page",
+ "launchType": "standard"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/Data.java b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/Data.java
new file mode 100644
index 00000000..783229a8
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/Data.java
@@ -0,0 +1,8 @@
+package com.example.assignment_app;
+
+import ohos.data.orm.OrmDatabase;;
+import ohos.data.orm.annotation.Database;
+
+@Database(entities = {User.class}, version = 1)
+public abstract class Data extends OrmDatabase {
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/MainAbility.java b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/MainAbility.java
new file mode 100644
index 00000000..8346e010
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/MainAbility.java
@@ -0,0 +1,13 @@
+package com.example.assignment_app;
+
+import com.example.assignment_app.slice.MainAbilitySlice;
+import ohos.aafwk.ability.Ability;
+import ohos.aafwk.content.Intent;
+
+public class MainAbility extends Ability {
+ @Override
+ public void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setMainRoute(MainAbilitySlice.class.getName());
+ }
+}
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/MyApplication.java b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/MyApplication.java
new file mode 100644
index 00000000..d9b5646c
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/MyApplication.java
@@ -0,0 +1,10 @@
+package com.example.assignment_app;
+
+import ohos.aafwk.ability.AbilityPackage;
+
+public class MyApplication extends AbilityPackage {
+ @Override
+ public void onInitialize() {
+ super.onInitialize();
+ }
+}
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/User.java b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/User.java
new file mode 100644
index 00000000..9018bfad
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/User.java
@@ -0,0 +1,78 @@
+package com.example.assignment_app;
+
+import ohos.data.orm.OrmObject;
+import ohos.data.orm.annotation.Entity;
+import ohos.data.orm.annotation.Index;
+import ohos.data.orm.annotation.PrimaryKey;
+
+@Entity(tableName = "Data", indices = {@Index(value = {"DB_COLUMN_EMAIL"}, name = "name_index", unique = true)})
+public class User extends OrmObject {
+ // Set the userId to the auto-generated primary key. Note that the auto-generated primary key takes effect only when the data type is a wrapper class.
+ @PrimaryKey(autoGenerate = true)
+ private Integer DB_COLUMN_PERSON_ID;
+ private String DB_COLUMN_LAST_NAME;
+ private String DB_COLUMN_FIRST_NAME;
+ private String DB_COLUMN_GENDER;
+ private String DB_COLUMN_MOBILE;
+ private String DB_COLUMN_EMAIL;
+ private String DB_COLUMN_PASSWORD;
+
+ public Integer getDB_COLUMN_PERSON_ID() {
+ return DB_COLUMN_PERSON_ID;
+ }
+
+ public void setDB_COLUMN_PERSON_ID(Integer DB_COLUMN_PERSON_ID) {
+ this.DB_COLUMN_PERSON_ID = DB_COLUMN_PERSON_ID;
+ }
+
+ public String getDB_COLUMN_FIRST_NAME() {
+ return DB_COLUMN_FIRST_NAME;
+ }
+
+ public void setDB_COLUMN_FIRST_NAME(String DB_COLUMN_FIRST_NAME) {
+ this.DB_COLUMN_FIRST_NAME = DB_COLUMN_FIRST_NAME;
+ }
+
+ public String getDB_COLUMN_LAST_NAME() {
+ return DB_COLUMN_LAST_NAME;
+ }
+
+ public void setDB_COLUMN_LAST_NAME(String DB_COLUMN_LAST_NAME) {
+ this.DB_COLUMN_LAST_NAME = DB_COLUMN_LAST_NAME;
+ }
+
+ public String getDB_COLUMN_GENDER() {
+ return DB_COLUMN_GENDER;
+ }
+
+ public void setDB_COLUMN_GENDER(String DB_COLUMN_GENDER) {
+ this.DB_COLUMN_GENDER = DB_COLUMN_GENDER;
+ }
+
+ public String getDB_COLUMN_MOBILE() {
+ return DB_COLUMN_MOBILE;
+ }
+
+ public void setDB_COLUMN_MOBILE(String DB_COLUMN_MOBILE) {
+ this.DB_COLUMN_MOBILE = DB_COLUMN_MOBILE;
+ }
+
+ public String getDB_COLUMN_EMAIL() {
+ return DB_COLUMN_EMAIL;
+ }
+
+ public void setDB_COLUMN_EMAIL(String DB_COLUMN_EMAIL) {
+ this.DB_COLUMN_EMAIL = DB_COLUMN_EMAIL;
+ }
+
+ public String getDB_COLUMN_PASSWORD() {
+ return DB_COLUMN_PASSWORD;
+ }
+
+ public void setDB_COLUMN_PASSWORD(String DB_COLUMN_PASSWORD) {
+ this.DB_COLUMN_PASSWORD = DB_COLUMN_PASSWORD;
+ }
+
+
+ // Add the getter and setter methods.
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Dashboard.java b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Dashboard.java
new file mode 100644
index 00000000..5e2f8b49
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Dashboard.java
@@ -0,0 +1,16 @@
+package com.example.assignment_app.slice;
+
+import com.example.assignment_app.ResourceTable;
+import ohos.aafwk.ability.AbilitySlice;
+import ohos.aafwk.content.Intent;
+import ohos.agp.components.Button;
+
+public class Dashboard extends AbilitySlice {
+ @Override
+ protected void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setUIContent(ResourceTable.Layout_dashboard);
+ Button logout = (Button) findComponentById(ResourceTable.Id_logout_btn);
+ logout.setClickedListener(List -> present(new MainAbilitySlice(),new Intent()));
+ }
+}
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Login.java b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Login.java
new file mode 100644
index 00000000..726435ca
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Login.java
@@ -0,0 +1,68 @@
+package com.example.assignment_app.slice;
+
+import com.example.assignment_app.Data;
+import com.example.assignment_app.ResourceTable;
+import com.example.assignment_app.User;
+import ohos.aafwk.ability.AbilitySlice;
+import ohos.aafwk.content.Intent;
+import ohos.agp.components.Button;
+import ohos.agp.components.Component;
+import ohos.agp.components.TextField;
+import ohos.agp.window.dialog.ToastDialog;
+import ohos.data.DatabaseHelper;
+import ohos.data.orm.OrmContext;
+import ohos.data.orm.OrmPredicates;
+
+import java.util.List;
+
+public class Login extends AbilitySlice {
+ @Override
+ protected void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setUIContent(ResourceTable.Layout_login);
+ TextField email = (TextField) findComponentById(ResourceTable.Id_email_);
+ TextField password = (TextField) findComponentById(ResourceTable.Id_password_);
+ email.setText("");
+ password.setText("");
+ Button login = (Button) findComponentById(ResourceTable.Id_login_btn);
+ DatabaseHelper helper = new DatabaseHelper(Login.this);
+ OrmContext context = helper.getOrmContext(getString(ResourceTable.String_alias), getString(ResourceTable.String_db_name), Data.class);
+ Button signup = (Button) findComponentById(ResourceTable.Id_signup_btn);
+ signup.setClickedListener(List -> present(new Signup(),new Intent()));
+ login.setClickedListener(new Component.ClickedListener() {
+ @Override
+ public void onClick(Component component) {
+ if (email.getText().equals("") || password.getText().equals(""))
+ {
+ new ToastDialog(getContext()).setText(getString(ResourceTable.String_feild)).show();
+ }
+ else
+ {
+ OrmPredicates query = context.where(User.class).equalTo("DB_COLUMN_EMAIL", email.getText());
+ try {
+ List users = context.query(query);
+ if (users.size()!=0 && password.getText().equals(users.get(0).getDB_COLUMN_PASSWORD()))
+ {
+ new ToastDialog(getContext()).setText("Login Success").show();
+ present(new Dashboard(),new Intent());
+ }
+ else if (users.size()!=0)
+ {
+ new ToastDialog(getContext()).setText(getString(ResourceTable.String_wrong_pass)).show();
+ }
+ else
+ {
+ new ToastDialog(getContext()).setText(getString(ResourceTable.String_not_registered)).show();
+ }
+ }
+ catch (Exception e)
+ {
+ new ToastDialog(getContext()).setText(getString(ResourceTable.String_wrong_email_pass)).show();
+ }
+ }
+
+ }
+ });
+
+ }
+}
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/MainAbilitySlice.java b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/MainAbilitySlice.java
new file mode 100644
index 00000000..d501f464
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/MainAbilitySlice.java
@@ -0,0 +1,85 @@
+package com.example.assignment_app.slice;
+
+import com.example.assignment_app.ResourceTable;
+import ohos.aafwk.ability.AbilitySlice;
+import ohos.aafwk.content.Intent;
+import ohos.agp.animation.Animator;
+import ohos.agp.animation.AnimatorGroup;
+import ohos.agp.animation.AnimatorProperty;
+import ohos.agp.animation.AnimatorValue;
+import ohos.agp.components.Button;
+import ohos.agp.components.Component;
+import ohos.agp.components.Image;
+import ohos.agp.components.Text;
+import ohos.agp.components.element.FrameAnimationElement;
+
+public class MainAbilitySlice extends AbilitySlice implements Component.ClickedListener{
+
+ private AnimatorValue button1Animation;
+ private AnimatorProperty button2Animation;
+ private AnimatorProperty button3Animation;
+ private Image imageComponent;
+ @Override
+ public void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setUIContent(ResourceTable.Layout_ability_main);
+
+ button1Animation = new AnimatorValue();
+ button1Animation.setDuration(1000);
+ button1Animation.setLoopedCount(2);
+ button1Animation.setCurveType(Animator.CurveType.CUBIC_BEZIER_FRICTION);
+ Button login = (Button) findComponentById(ResourceTable.Id_login_btn);
+ Button slide = (Button) findComponentById(ResourceTable.Id_slide_btn);
+ slide.setClickedListener(this::onClick);
+ Button signup = (Button) findComponentById(ResourceTable.Id_signup_btn);
+ imageComponent = (Image) findComponentById(ResourceTable.Id_img);
+ Text main = (Text) findComponentById(ResourceTable.Id_main);
+ button1Animation.setValueUpdateListener(new AnimatorValue.ValueUpdateListener() {
+ @Override
+ public void onUpdate(AnimatorValue animatorValue, float value) {
+ //animating button position
+ slide.setContentPosition((int) (370 * value), slide.getContentPositionY());
+ }
+ });
+ button2Animation = imageComponent.createAnimatorProperty();
+ button2Animation.setDuration(2000).rotate(360).setLoopedCount(-1);
+ button3Animation = main.createAnimatorProperty();
+ button3Animation.setDuration(4000).moveFromX(-1000).moveToX(1000).setLoopedCount(-1);
+ imageComponent.setBindStateChangedListener(new Component.BindStateChangedListener() {
+ @Override
+ public void onComponentBoundToWindow(Component component) {
+ button2Animation.start();
+ button3Animation.start();
+ }
+
+ @Override
+ public void onComponentUnboundFromWindow(Component component) {
+ button2Animation.stop();
+ button3Animation.stop();
+ }});
+
+ login.setClickedListener(List -> present(new Login(),new Intent()));
+ signup.setClickedListener(List -> present(new Signup(),new Intent()));
+ }
+
+ @Override
+ public void onActive() {
+ super.onActive();
+ }
+
+ @Override
+ public void onForeground(Intent intent) {
+ super.onForeground(intent);
+ }
+
+
+
+ @Override
+ public void onClick(Component component) {
+ switch (component.getId()){
+ case ResourceTable.Id_slide_btn:
+ button1Animation.start();
+ break;
+ }
+ }
+}
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Signup.java b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Signup.java
new file mode 100644
index 00000000..974a815c
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Signup.java
@@ -0,0 +1,261 @@
+package com.example.assignment_app.slice;
+
+import com.example.assignment_app.Data;
+import com.example.assignment_app.ResourceTable;
+import com.example.assignment_app.User;
+import ohos.aafwk.ability.AbilitySlice;
+import ohos.aafwk.content.Intent;
+import ohos.agp.components.*;
+import ohos.agp.window.dialog.ToastDialog;
+import ohos.data.DatabaseHelper;
+import ohos.data.orm.OrmContext;
+import ohos.data.orm.OrmPredicates;
+import ohos.hiviewdfx.HiLogLabel;
+
+import java.util.List;
+
+
+public class Signup extends AbilitySlice {
+
+ private static final HiLogLabel LABEL_LOG = new HiLogLabel(3, 0xD001100, "MainAbilitySlice");
+
+
+ @Override
+ protected void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setUIContent(ResourceTable.Layout_signup);
+ TextField firstname = (TextField) findComponentById(ResourceTable.Id_firstname);
+ TextField lastname = (TextField) findComponentById(ResourceTable.Id_lastname);
+ TextField email = (TextField) findComponentById(ResourceTable.Id_email);
+ TextField password = (TextField) findComponentById(ResourceTable.Id_password);
+ TextField mobile = (TextField) findComponentById(ResourceTable.Id_mobile);
+ RadioButton male = (RadioButton) findComponentById(ResourceTable.Id_gender_male);
+ RadioButton female = (RadioButton) findComponentById(ResourceTable.Id_gender_female);
+ Button signup = (Button) findComponentById(ResourceTable.Id_signup_btn);
+ Button login = (Button) findComponentById(ResourceTable.Id_login_btn);
+ Text er1 = (Text) findComponentById(ResourceTable.Id_er1);
+ Text er2 = (Text) findComponentById(ResourceTable.Id_er2);
+ Text er3 = (Text) findComponentById(ResourceTable.Id_er3);
+ Text er4 = (Text) findComponentById(ResourceTable.Id_er4);
+ Text er5 = (Text) findComponentById(ResourceTable.Id_er5);
+ Text er6 = (Text) findComponentById(ResourceTable.Id_er6);
+
+ // All field cleared
+ firstname.setText("");
+ lastname.setText("");
+ email.setText("");
+ password.setText("");
+ mobile.setText("");
+ male.setChecked(false);
+ female.setChecked(false);
+ er1.setVisibility(Component.INVISIBLE);
+ er2.setVisibility(Component.INVISIBLE);
+ er3.setVisibility(Component.INVISIBLE);
+ er4.setVisibility(Component.INVISIBLE);
+ er5.setVisibility(Component.INVISIBLE);
+ er6.setVisibility(Component.INVISIBLE);
+
+ DatabaseHelper helper = new DatabaseHelper(Signup.this);
+ OrmContext context = helper.getOrmContext(getString(ResourceTable.String_alias), getString(ResourceTable.String_db_name), Data.class);
+ User user = new User();
+ firstname.setFocusChangedListener((component, isFocused) -> {
+ String name = firstname.getText();
+ if (!isFocused) {
+ if (!name.matches(getString(ResourceTable.String_name_regex))) {
+
+ er1.setVisibility(Component.VISIBLE);
+ }
+ else
+ {
+ er1.setVisibility(Component.INVISIBLE);
+ }
+
+ }
+ });
+
+ male.setClickedListener(new Component.ClickedListener() {
+ @Override
+ public void onClick(Component component) {
+ female.setChecked(false);
+ }
+ });
+
+ female.setClickedListener(new Component.ClickedListener() {
+ @Override
+ public void onClick(Component component) {
+ male.setChecked(false);
+ }
+ });
+
+ lastname.setFocusChangedListener((component, isFocused) -> {
+ String name = lastname.getText();
+ if (!isFocused) {
+ if (!name.matches(getString(ResourceTable.String_name_regex))) {
+
+
+ er2.setVisibility(Component.VISIBLE);
+ }
+ else
+ {
+
+ er2.setVisibility(Component.INVISIBLE);
+ }
+
+ }
+ });
+
+
+ email.setFocusChangedListener((component, isFocused) -> {
+ String name = email.getText();
+ if (!isFocused) {
+ if (!name.matches(getString(ResourceTable.String_email_regex))) {
+
+ er3.setVisibility(Component.VISIBLE);
+ }
+ else
+ {
+
+ er3.setVisibility(Component.INVISIBLE);
+ }
+
+ }
+ });
+
+ password.setFocusChangedListener((component, isFocused) -> {
+ String name = password.getText();
+ if (!isFocused) {
+ if (!name.matches(getString(ResourceTable.String_pass_regex))) {
+
+ er4.setVisibility(Component.VISIBLE);
+ }
+ else
+ {
+
+ er4.setVisibility(Component.INVISIBLE);
+ }
+
+ }
+ });
+
+ mobile.setFocusChangedListener((component, isFocused) -> {
+ String name = mobile.getText();
+ if (!isFocused) {
+ if (!name.matches(getString(ResourceTable.String_mobile_regex))) {
+
+
+ er5.setVisibility(Component.VISIBLE);
+ }
+ else
+ {
+
+ er5.setVisibility(Component.INVISIBLE);
+ }
+
+ }
+ });
+
+
+ login.setClickedListener(List -> present(new Login(),new Intent()));
+
+ signup.setClickedListener(new Component.ClickedListener() {
+ @Override
+ public void onClick(Component component) {
+ if ((!male.isChecked()) && (!female.isChecked()) )
+ {
+ er6.setVisibility(Component.VISIBLE);
+ }
+ else
+ {
+ er6.setVisibility(Component.INVISIBLE);
+ }
+
+ // checking if focus was on some feild and signup btn pressed, verifying that data format
+ //
+ if (firstname.getText().matches(getString(ResourceTable.String_name_regex))) {
+ er1.setVisibility(Component.INVISIBLE);
+ }
+ else
+ {
+ er1.setVisibility(Component.VISIBLE);
+ }
+ if (lastname.getText().matches(getString(ResourceTable.String_name_regex))) {
+
+ er2.setVisibility(Component.INVISIBLE);
+ }else
+ {
+ er2.setVisibility(Component.VISIBLE);
+ }
+ if (email.getText().matches(getString(ResourceTable.String_email_regex))) {
+
+ er3.setVisibility(Component.INVISIBLE);
+ }else
+ {
+ er3.setVisibility(Component.VISIBLE);
+ }
+ if (password.getText().matches(getString(ResourceTable.String_pass_regex))) {
+
+ er4.setVisibility(Component.INVISIBLE);
+ }else
+ {
+ er4.setVisibility(Component.VISIBLE);
+ }
+ if (mobile.getText().matches(getString(ResourceTable.String_mobile_regex))) {
+
+ er5.setVisibility(Component.INVISIBLE);
+ }else
+ {
+ er5.setVisibility(Component.VISIBLE);
+ }
+
+
+ // Checking If anything empty
+
+ if(email.getText().equals("") || password.getText().equals("") || firstname.getText().equals("") || lastname.getText().equals("") || mobile.getText().equals(""))
+ {
+ new ToastDialog(getContext()).setText(getString(ResourceTable.String_feild)).show();
+ //present(new Signup(), new Intent());
+ }
+ else if(er1.getVisibility()==0 || er2.getVisibility()==0 || er3.getVisibility()==0 || er4.getVisibility()==0 || er5.getVisibility()==0 || er6.getVisibility()==0)
+ {
+ new ToastDialog(getContext()).setText(getString(ResourceTable.String_correct_data)).show();
+ }
+
+ else {
+ OrmPredicates query = context.where(User.class).equalTo("DB_COLUMN_EMAIL", email.getText());
+ List users = context.query(query);
+ if (users.size() == 0) {
+
+ user.setDB_COLUMN_FIRST_NAME(firstname.getText());
+ if (male.isChecked()) {
+ user.setDB_COLUMN_GENDER(getString(ResourceTable.String_male));
+
+ }
+ else {
+ user.setDB_COLUMN_GENDER(getString(ResourceTable.String_female));
+ }
+ user.setDB_COLUMN_PASSWORD(password.getText());
+ user.setDB_COLUMN_LAST_NAME(lastname.getText());
+ user.setDB_COLUMN_MOBILE(mobile.getText());
+ user.setDB_COLUMN_EMAIL(email.getText());
+ try {
+ boolean isSuccessed = context.insert(user);
+ isSuccessed = context.flush();
+ //present(new MainAbilitySlice(), new Intent());
+ new ToastDialog(getContext()).setText("Success").show();
+ present(new MainAbilitySlice(),new Intent());
+ } catch (Exception e) {
+ new ToastDialog(getContext()).setText("Used Email").show();
+ email.setText("");
+ //present(new Signup(), new Intent());
+ }
+ } else {
+ new ToastDialog(getContext()).setText("Email used").show();
+ email.setText("");
+ //present(new MainAbilitySlice(), new Intent());
+ }
+ }
+ }
+ });
+ }
+
+}
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/element/string.json b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/element/string.json
new file mode 100644
index 00000000..5774f8e9
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/element/string.json
@@ -0,0 +1,104 @@
+{
+ "string": [
+ {
+ "name": "app_name",
+ "value": "assignment_app"
+ },
+ {
+ "name": "mainability_description",
+ "value": "Java_Phone_Empty Feature Ability"
+ },
+ {
+ "name": "mainability_HelloWorld",
+ "value": "YOLO"
+ },
+ {
+ "name": "persondataability_description",
+ "value": "hap sample empty provider"
+ },
+ {
+ "name": "pass_regex",
+ "value": "^.{5,}$"
+ },
+ {
+ "name": "name_regex",
+ "value":"^[a-zA-Z]+$"
+ },
+ {
+ "name": "email_regex",
+ "value": "^[a-zA-Z0-9+_.-]+@[a-zA-Z0-9.-]+$"
+ },
+ {
+ "name": "mobile_regex",
+ "value": "^[0-9]{10}$"
+ },
+ {
+ "name": "alias",
+ "value": "Data"
+ },
+ {
+ "name": "db_name",
+ "value": "Data.db"
+ },
+ {
+ "name": "male",
+ "value": "Male"
+ },
+ {
+ "name": "female",
+ "value": "Female"
+ },
+ {
+ "name": "yes",
+ "value": "Yes"
+ },
+ {
+ "name": "no",
+ "value": "No"
+ },
+ {
+ "name": "error_toast",
+ "value": "Email or Password did not matched"
+ },
+ {
+ "name": "em",
+ "value": "em"
+ },
+ {
+ "name": "pas",
+ "value": "pas"
+ },
+ {
+ "name": "feild",
+ "value": "Enter All feilds"
+ },
+ {
+ "name": "not_registered",
+ "value": "Email not registred"
+ },
+ {
+ "name": "dialog_text",
+ "value": "Go to Login page to enter the app?"
+ },
+ {
+ "name": "dialog_title",
+ "value": "Please Verify"
+ },
+ {
+ "name": "dialog_no_click",
+ "value":"Clicked No button"
+ },
+ {
+ "name": "correct_data",
+ "value": "Enter Correct data and gender"
+ },
+ {
+ "name": "wrong_pass",
+ "value": "Wrong password"
+ },
+ {
+ "name": "wrong_email_pass",
+ "value": "Wrong email/password"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/graphic/background_ability_main.xml b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/graphic/background_ability_main.xml
new file mode 100644
index 00000000..c0c0a3df
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/graphic/background_ability_main.xml
@@ -0,0 +1,6 @@
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/ability_main.xml b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/ability_main.xml
new file mode 100644
index 00000000..b8bcb1c1
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/ability_main.xml
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/dashboard.xml b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/dashboard.xml
new file mode 100644
index 00000000..0cb996f9
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/dashboard.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/login.xml b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/login.xml
new file mode 100644
index 00000000..bd55b9a0
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/login.xml
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/signup.xml b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/signup.xml
new file mode 100644
index 00000000..d73dd141
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/signup.xml
@@ -0,0 +1,238 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/media/email.png b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/media/email.png
new file mode 100644
index 00000000..a579780f
Binary files /dev/null and b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/media/email.png differ
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/media/icon.png b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/media/icon.png
new file mode 100644
index 00000000..ce307a88
Binary files /dev/null and b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/media/icon.png differ
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/ohosTest/config.json b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/ohosTest/config.json
new file mode 100644
index 00000000..df78b724
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/ohosTest/config.json
@@ -0,0 +1,41 @@
+{
+ "app": {
+ "bundleName": "com.example.assignment_app",
+ "vendor": "example",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ },
+ "apiVersion": {
+ "compatible": 4,
+ "target": 5,
+ "releaseType": "Release"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.example.assignment_app",
+ "name": "testModule",
+ "deviceType": [
+ "phone"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "entry_test",
+ "moduleType": "feature",
+ "installationFree": true
+ },
+ "abilities": [
+ {
+ "name": "decc.testkit.runner.EntryAbility",
+ "description": "Test Entry Ability",
+ "icon": "$media:icon",
+ "label": "$string:app_name",
+ "launchType": "standard",
+ "orientation": "landscape",
+ "visible": true,
+ "type": "page"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/ohosTest/java/com/example/assignment_app/ExampleOhosTest.java b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/ohosTest/java/com/example/assignment_app/ExampleOhosTest.java
new file mode 100644
index 00000000..63d3e103
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/ohosTest/java/com/example/assignment_app/ExampleOhosTest.java
@@ -0,0 +1,14 @@
+package com.example.assignment_app;
+
+import ohos.aafwk.ability.delegation.AbilityDelegatorRegistry;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+public class ExampleOhosTest {
+ @Test
+ public void testBundleName() {
+ final String actualBundleName = AbilityDelegatorRegistry.getArguments().getTestBundleName();
+ assertEquals("com.example.assignment_app", actualBundleName);
+ }
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/test/java/com/example/assignment_app/ExampleTest.java b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/test/java/com/example/assignment_app/ExampleTest.java
new file mode 100644
index 00000000..154924d0
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/entry/src/test/java/com/example/assignment_app/ExampleTest.java
@@ -0,0 +1,9 @@
+package com.example.assignment_app;
+
+import org.junit.Test;
+
+public class ExampleTest {
+ @Test
+ public void onStart() {
+ }
+}
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/gradle.properties b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/gradle.properties
new file mode 100644
index 00000000..0daf1830
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/gradle.properties
@@ -0,0 +1,10 @@
+# Project-wide Gradle settings.
+# IDE (e.g. DevEco Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+# If the Chinese output is garbled, please configure the following parameter.
+# org.gradle.jvmargs=-Dfile.encoding=GBK
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/gradle/wrapper/gradle-wrapper.jar b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 00000000..490fda85
Binary files /dev/null and b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/gradle/wrapper/gradle-wrapper.properties b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000..f59159e8
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://repo.huaweicloud.com/gradle/gradle-6.3-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/gradlew b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/gradlew
new file mode 100644
index 00000000..2fe81a7d
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/gradlew
@@ -0,0 +1,183 @@
+#!/usr/bin/env sh
+
+#
+# Copyright 2015 the original author or authors.
+#
+# 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
+#
+# https://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.
+#
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=`expr $i + 1`
+ done
+ case $i in
+ 0) set -- ;;
+ 1) set -- "$args0" ;;
+ 2) set -- "$args0" "$args1" ;;
+ 3) set -- "$args0" "$args1" "$args2" ;;
+ 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=`save "$@"`
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+exec "$JAVACMD" "$@"
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/gradlew.bat b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/gradlew.bat
new file mode 100644
index 00000000..62bd9b9c
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/gradlew.bat
@@ -0,0 +1,103 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/settings.gradle b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/settings.gradle
new file mode 100644
index 00000000..4773db73
--- /dev/null
+++ b/HarmonyOS/Day4 Assingment/Alpesh/assignment_app/settings.gradle
@@ -0,0 +1 @@
+include ':entry'
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/.gitignore b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/.gitignore
new file mode 100644
index 00000000..37a4eb8b
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/.gitignore
@@ -0,0 +1,15 @@
+*.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
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/.idea/.gitignore b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/.idea/.gitignore
new file mode 100644
index 00000000..26d33521
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/.idea/compiler.xml b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/.idea/compiler.xml
new file mode 100644
index 00000000..61a9130c
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/.idea/compiler.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/.idea/gradle.xml b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/.idea/gradle.xml
new file mode 100644
index 00000000..b9090f42
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/.idea/gradle.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/.idea/jarRepositories.xml b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/.idea/jarRepositories.xml
new file mode 100644
index 00000000..1dfcd020
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/.idea/jarRepositories.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/.idea/misc.xml b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/.idea/misc.xml
new file mode 100644
index 00000000..58918f50
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/.idea/previewer/phone/phoneSettingConfig_-925978332.json b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/.idea/previewer/phone/phoneSettingConfig_-925978332.json
new file mode 100644
index 00000000..f505e6b9
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/.idea/previewer/phone/phoneSettingConfig_-925978332.json
@@ -0,0 +1,25 @@
+{
+ "setting": {
+ "1.0.1": {
+ "Language": {
+ "args": {
+ "Language": "zh-CN"
+ }
+ }
+ }
+ },
+ "frontend": {
+ "1.0.0": {
+ "Resolution": {
+ "args": {
+ "Resolution": "360*780"
+ }
+ },
+ "DeviceType": {
+ "args": {
+ "DeviceType": "phone"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/.idea/previewer/previewConfig.json b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/.idea/previewer/previewConfig.json
new file mode 100644
index 00000000..ae1b07b4
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/.idea/previewer/previewConfig.json
@@ -0,0 +1,9 @@
+{
+ "1.0.0": {
+ "LastPreviewDevice": {
+ "C:\\Users\\lucifer\\DevEcoStudioProjects\\assignment_app\\entry": [
+ "phone"
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/build.gradle b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/build.gradle
new file mode 100644
index 00000000..9ec29b00
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/build.gradle
@@ -0,0 +1,37 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+apply plugin: 'com.huawei.ohos.app'
+
+ohos {
+ compileSdkVersion 5
+ defaultConfig {
+ compatibleSdkVersion 4
+ }
+}
+
+buildscript {
+ repositories {
+ maven {
+ url 'https://repo.huaweicloud.com/repository/maven/'
+ }
+ maven {
+ url 'https://developer.huawei.com/repo/'
+ }
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.huawei.ohos:hap:2.4.2.7'
+ classpath 'com.huawei.ohos:decctest:1.0.0.7'
+ }
+}
+
+allprojects {
+ repositories {
+ maven {
+ url 'https://repo.huaweicloud.com/repository/maven/'
+ }
+ maven {
+ url 'https://developer.huawei.com/repo/'
+ }
+ jcenter()
+ }
+}
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/.gitignore b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/.gitignore
new file mode 100644
index 00000000..796b96d1
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/build.gradle b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/build.gradle
new file mode 100644
index 00000000..283e17ef
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/build.gradle
@@ -0,0 +1,28 @@
+apply plugin: 'com.huawei.ohos.hap'
+apply plugin: 'com.huawei.ohos.decctest'
+ohos {
+ compileSdkVersion 5
+ defaultConfig {
+ compatibleSdkVersion 4
+ }
+ buildTypes {
+ release {
+ proguardOpt {
+ proguardEnabled false
+ rulesFiles 'proguard-rules.pro'
+ }
+ }
+ }
+ compileOptions{
+ annotationEnabled true
+ }
+}
+
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
+ testImplementation 'junit:junit:4.13'
+ ohosTestImplementation 'com.huawei.ohos.testkit:runner:1.0.0.100'
+}
+decc {
+ supportType = ['html','xml']
+}
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/proguard-rules.pro b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/proguard-rules.pro
new file mode 100644
index 00000000..f7666e47
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/proguard-rules.pro
@@ -0,0 +1 @@
+# config module specific ProGuard rules here.
\ No newline at end of file
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/config.json b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/config.json
new file mode 100644
index 00000000..1375b2a7
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/config.json
@@ -0,0 +1,49 @@
+{
+ "app": {
+ "bundleName": "com.example.assignment_app",
+ "vendor": "example",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ },
+ "apiVersion": {
+ "compatible": 4,
+ "target": 5,
+ "releaseType": "Release"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.example.assignment_app",
+ "name": ".MyApplication",
+ "deviceType": [
+ "phone"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "entry",
+ "moduleType": "entry"
+ },
+ "abilities": [
+ {
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ],
+ "orientation": "unspecified",
+ "name": "com.example.assignment_app.MainAbility",
+ "icon": "$media:icon",
+ "description": "$string:mainability_description",
+ "label": "$string:app_name",
+ "type": "page",
+ "launchType": "standard"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/Data.java b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/Data.java
new file mode 100644
index 00000000..783229a8
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/Data.java
@@ -0,0 +1,8 @@
+package com.example.assignment_app;
+
+import ohos.data.orm.OrmDatabase;;
+import ohos.data.orm.annotation.Database;
+
+@Database(entities = {User.class}, version = 1)
+public abstract class Data extends OrmDatabase {
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/MainAbility.java b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/MainAbility.java
new file mode 100644
index 00000000..8346e010
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/MainAbility.java
@@ -0,0 +1,13 @@
+package com.example.assignment_app;
+
+import com.example.assignment_app.slice.MainAbilitySlice;
+import ohos.aafwk.ability.Ability;
+import ohos.aafwk.content.Intent;
+
+public class MainAbility extends Ability {
+ @Override
+ public void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setMainRoute(MainAbilitySlice.class.getName());
+ }
+}
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/MyApplication.java b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/MyApplication.java
new file mode 100644
index 00000000..d9b5646c
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/MyApplication.java
@@ -0,0 +1,10 @@
+package com.example.assignment_app;
+
+import ohos.aafwk.ability.AbilityPackage;
+
+public class MyApplication extends AbilityPackage {
+ @Override
+ public void onInitialize() {
+ super.onInitialize();
+ }
+}
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/User.java b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/User.java
new file mode 100644
index 00000000..9018bfad
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/User.java
@@ -0,0 +1,78 @@
+package com.example.assignment_app;
+
+import ohos.data.orm.OrmObject;
+import ohos.data.orm.annotation.Entity;
+import ohos.data.orm.annotation.Index;
+import ohos.data.orm.annotation.PrimaryKey;
+
+@Entity(tableName = "Data", indices = {@Index(value = {"DB_COLUMN_EMAIL"}, name = "name_index", unique = true)})
+public class User extends OrmObject {
+ // Set the userId to the auto-generated primary key. Note that the auto-generated primary key takes effect only when the data type is a wrapper class.
+ @PrimaryKey(autoGenerate = true)
+ private Integer DB_COLUMN_PERSON_ID;
+ private String DB_COLUMN_LAST_NAME;
+ private String DB_COLUMN_FIRST_NAME;
+ private String DB_COLUMN_GENDER;
+ private String DB_COLUMN_MOBILE;
+ private String DB_COLUMN_EMAIL;
+ private String DB_COLUMN_PASSWORD;
+
+ public Integer getDB_COLUMN_PERSON_ID() {
+ return DB_COLUMN_PERSON_ID;
+ }
+
+ public void setDB_COLUMN_PERSON_ID(Integer DB_COLUMN_PERSON_ID) {
+ this.DB_COLUMN_PERSON_ID = DB_COLUMN_PERSON_ID;
+ }
+
+ public String getDB_COLUMN_FIRST_NAME() {
+ return DB_COLUMN_FIRST_NAME;
+ }
+
+ public void setDB_COLUMN_FIRST_NAME(String DB_COLUMN_FIRST_NAME) {
+ this.DB_COLUMN_FIRST_NAME = DB_COLUMN_FIRST_NAME;
+ }
+
+ public String getDB_COLUMN_LAST_NAME() {
+ return DB_COLUMN_LAST_NAME;
+ }
+
+ public void setDB_COLUMN_LAST_NAME(String DB_COLUMN_LAST_NAME) {
+ this.DB_COLUMN_LAST_NAME = DB_COLUMN_LAST_NAME;
+ }
+
+ public String getDB_COLUMN_GENDER() {
+ return DB_COLUMN_GENDER;
+ }
+
+ public void setDB_COLUMN_GENDER(String DB_COLUMN_GENDER) {
+ this.DB_COLUMN_GENDER = DB_COLUMN_GENDER;
+ }
+
+ public String getDB_COLUMN_MOBILE() {
+ return DB_COLUMN_MOBILE;
+ }
+
+ public void setDB_COLUMN_MOBILE(String DB_COLUMN_MOBILE) {
+ this.DB_COLUMN_MOBILE = DB_COLUMN_MOBILE;
+ }
+
+ public String getDB_COLUMN_EMAIL() {
+ return DB_COLUMN_EMAIL;
+ }
+
+ public void setDB_COLUMN_EMAIL(String DB_COLUMN_EMAIL) {
+ this.DB_COLUMN_EMAIL = DB_COLUMN_EMAIL;
+ }
+
+ public String getDB_COLUMN_PASSWORD() {
+ return DB_COLUMN_PASSWORD;
+ }
+
+ public void setDB_COLUMN_PASSWORD(String DB_COLUMN_PASSWORD) {
+ this.DB_COLUMN_PASSWORD = DB_COLUMN_PASSWORD;
+ }
+
+
+ // Add the getter and setter methods.
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Dashboard.java b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Dashboard.java
new file mode 100644
index 00000000..5e2f8b49
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Dashboard.java
@@ -0,0 +1,16 @@
+package com.example.assignment_app.slice;
+
+import com.example.assignment_app.ResourceTable;
+import ohos.aafwk.ability.AbilitySlice;
+import ohos.aafwk.content.Intent;
+import ohos.agp.components.Button;
+
+public class Dashboard extends AbilitySlice {
+ @Override
+ protected void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setUIContent(ResourceTable.Layout_dashboard);
+ Button logout = (Button) findComponentById(ResourceTable.Id_logout_btn);
+ logout.setClickedListener(List -> present(new MainAbilitySlice(),new Intent()));
+ }
+}
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Login.java b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Login.java
new file mode 100644
index 00000000..72c48b00
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Login.java
@@ -0,0 +1,81 @@
+package com.example.assignment_app.slice;
+
+import com.example.assignment_app.Data;
+import com.example.assignment_app.ResourceTable;
+import com.example.assignment_app.User;
+import ohos.aafwk.ability.AbilitySlice;
+import ohos.aafwk.content.Intent;
+import ohos.agp.components.Button;
+import ohos.agp.components.Component;
+import ohos.agp.components.LayoutScatter;
+import ohos.agp.components.TextField;
+import ohos.agp.window.dialog.ToastDialog;
+import ohos.data.DatabaseHelper;
+import ohos.data.orm.OrmContext;
+import ohos.data.orm.OrmPredicates;
+
+import java.util.List;
+
+public class Login extends AbilitySlice {
+ @Override
+ protected void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setUIContent(ResourceTable.Layout_login);
+ TextField email = (TextField) findComponentById(ResourceTable.Id_email_);
+ TextField password = (TextField) findComponentById(ResourceTable.Id_password_);
+ if(intent.hasParameter(getString(ResourceTable.String_em))) {
+ String s1= intent.getStringParam(getString(ResourceTable.String_em));
+ String s2= intent.getStringParam(getString(ResourceTable.String_pas));
+ email.setText(s1);
+ password.setText(s2);
+ }
+ else {
+ email.setText("");
+ password.setText("");
+ }
+ Component toast_component=LayoutScatter.getInstance(Login.this).parse(ResourceTable.Layout_toast, null, false);
+ Button login = (Button) findComponentById(ResourceTable.Id_login_btn);
+ DatabaseHelper helper = new DatabaseHelper(Login.this);
+ OrmContext context = helper.getOrmContext(getString(ResourceTable.String_alias), getString(ResourceTable.String_db_name), Data.class);
+ Button signup = (Button) findComponentById(ResourceTable.Id_signup_btn);
+ signup.setClickedListener(List -> present(new Signup(),new Intent()));
+ login.setClickedListener(new Component.ClickedListener() {
+ @Override
+ public void onClick(Component component) {
+ if (email.getText().equals("") || password.getText().equals(""))
+ {
+ new ToastDialog(getContext()).setText(getString(ResourceTable.String_feild)).show();
+ }
+ else
+ {
+ OrmPredicates query = context.where(User.class).equalTo("DB_COLUMN_EMAIL", email.getText());
+ try {
+ List users = context.query(query);
+ if (users.size()!=0 && password.getText().equals(users.get(0).getDB_COLUMN_PASSWORD()))
+ {
+ new ToastDialog(getContext()).setText("Login Success").show();
+ present(new Dashboard(),new Intent());
+ }
+ else if (users.size()!=0)
+ {
+ new ToastDialog(getContext()).setComponent(toast_component).show();
+ }
+ else
+ {
+ new ToastDialog(getContext()).setText(getString(ResourceTable.String_not_registered)).show();
+ }
+ }
+ catch (Exception e)
+ {
+
+ // Component toast_component=LayoutScatter.getInstance(Login.this).parse(ResourceTable.Layout_toast, null, false);
+ new ToastDialog(getContext()).setComponent(toast_component).show();
+ //present(new Login(),new Intent());.setText("did not matched")
+ }
+ }
+
+ }
+ });
+
+ }
+}
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/MainAbilitySlice.java b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/MainAbilitySlice.java
new file mode 100644
index 00000000..24091bd7
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/MainAbilitySlice.java
@@ -0,0 +1,119 @@
+package com.example.assignment_app.slice;
+
+import com.example.assignment_app.ResourceTable;
+import ohos.aafwk.ability.AbilitySlice;
+import ohos.aafwk.content.Intent;
+import ohos.agp.animation.Animator;
+import ohos.agp.animation.AnimatorProperty;
+import ohos.agp.animation.AnimatorValue;
+import ohos.agp.components.Button;
+import ohos.agp.components.Component;
+import ohos.agp.components.Image;
+import ohos.agp.components.Text;
+import ohos.agp.window.dialog.CommonDialog;
+import ohos.agp.window.dialog.IDialog;
+import ohos.agp.window.dialog.ToastDialog;
+
+import static ohos.agp.components.ComponentContainer.LayoutConfig.MATCH_CONTENT;
+
+
+public class MainAbilitySlice extends AbilitySlice implements Component.ClickedListener {
+
+
+
+ private AnimatorValue button1Animation;
+ private AnimatorProperty button2Animation;
+ private AnimatorProperty button3Animation;
+ private Button customDialogButton;
+ private Image imageComponent;
+ @Override
+ public void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setUIContent(ResourceTable.Layout_ability_main);
+
+ button1Animation = new AnimatorValue();
+ button1Animation.setDuration(1000);
+ button1Animation.setLoopedCount(2);
+ button1Animation.setCurveType(Animator.CurveType.CUBIC_BEZIER_FRICTION);
+ Button login = (Button) findComponentById(ResourceTable.Id_login_btn);
+ Button slide = (Button) findComponentById(ResourceTable.Id_slide_btn);
+ slide.setClickedListener(this::onClick);
+ Button signup = (Button) findComponentById(ResourceTable.Id_signup_btn);
+ imageComponent = (Image) findComponentById(ResourceTable.Id_img);
+ Text main = (Text) findComponentById(ResourceTable.Id_main);
+ button1Animation.setValueUpdateListener(new AnimatorValue.ValueUpdateListener() {
+ @Override
+ public void onUpdate(AnimatorValue animatorValue, float value) {
+ //animating button position
+ slide.setContentPosition((int) (370 * value), slide.getContentPositionY());
+ }
+ });
+ button2Animation = imageComponent.createAnimatorProperty();
+ button2Animation.setDuration(2000).rotate(360).setLoopedCount(-1);
+ button3Animation = main.createAnimatorProperty();
+ button3Animation.setDuration(4000).moveFromX(-1000).moveToX(1000).setLoopedCount(-1);
+ imageComponent.setBindStateChangedListener(new Component.BindStateChangedListener() {
+ @Override
+ public void onComponentBoundToWindow(Component component) {
+ button2Animation.start();
+ button3Animation.start();
+ }
+
+ @Override
+ public void onComponentUnboundFromWindow(Component component) {
+ button2Animation.stop();
+ button3Animation.stop();
+ }});
+
+ login.setClickedListener(List -> present(new Login(),new Intent()));
+ signup.setClickedListener(List -> present(new Signup(),new Intent()));
+ }
+
+ @Override
+ public void onActive() {
+ super.onActive();
+ }
+
+ @Override
+ public void onForeground(Intent intent) {
+ super.onForeground(intent);
+ }
+
+
+
+ @Override
+ public void onClick(Component component) {
+ switch (component.getId()){
+ case ResourceTable.Id_slide_btn:
+ button1Animation.start();
+ break;
+ }
+ }
+
+
+ /*private void showCommonDialog() {
+ CommonDialog commonDialog = new CommonDialog(this);
+ commonDialog.setTitleText("Common Dialog");
+ commonDialog.setContentText("This is a common dialog");
+ commonDialog.setAutoClosable(true);
+ commonDialog.setSize(DIALOG_BOX_WIDTH, MATCH_CONTENT);
+ commonDialog.setButton(IDialog.BUTTON1, "Yes", (iDialog, i) -> {
+ showToast("Clicked Yes button");
+ iDialog.destroy();
+ });
+ commonDialog.setButton(IDialog.BUTTON2, "No", (iDialog, i) -> {
+ showToast("Clicked No button");
+ iDialog.destroy();
+ });
+ commonDialog.setButton(IDialog.BUTTON3, "Maybe", (iDialog, i) -> {
+ showToast("Clicked Maybe button");
+ iDialog.destroy();
+ });
+ commonDialog.show();
+ }*/
+
+
+ private void showToast(String msg) {
+ new ToastDialog(this).setText(msg).setDuration(500).show();
+ }
+}
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Signup.java b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Signup.java
new file mode 100644
index 00000000..40e663fb
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/java/com/example/assignment_app/slice/Signup.java
@@ -0,0 +1,289 @@
+package com.example.assignment_app.slice;
+
+import com.example.assignment_app.Data;
+import com.example.assignment_app.ResourceTable;
+import com.example.assignment_app.User;
+import ohos.aafwk.ability.AbilitySlice;
+import ohos.aafwk.content.Intent;
+import ohos.agp.components.*;
+import ohos.agp.window.dialog.CommonDialog;
+import ohos.agp.window.dialog.IDialog;
+import ohos.agp.window.dialog.ToastDialog;
+import ohos.data.DatabaseHelper;
+import ohos.data.orm.OrmContext;
+import ohos.data.orm.OrmPredicates;
+import ohos.hiviewdfx.HiLogLabel;
+
+import java.util.List;
+
+import static ohos.agp.components.ComponentContainer.LayoutConfig.MATCH_CONTENT;
+
+public class Signup extends AbilitySlice {
+
+ private static final HiLogLabel LABEL_LOG = new HiLogLabel(3, 0xD001100, "MainAbilitySlice");
+ public static final float DIALOG_BOX_CORNER_RADIUS = 36.0f;
+ public static final int DIALOG_BOX_WIDTH = 984;
+
+ @Override
+ protected void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setUIContent(ResourceTable.Layout_signup);
+ TextField firstname = (TextField) findComponentById(ResourceTable.Id_firstname);
+ TextField lastname = (TextField) findComponentById(ResourceTable.Id_lastname);
+ TextField email = (TextField) findComponentById(ResourceTable.Id_email);
+ TextField password = (TextField) findComponentById(ResourceTable.Id_password);
+ TextField mobile = (TextField) findComponentById(ResourceTable.Id_mobile);
+ RadioButton male = (RadioButton) findComponentById(ResourceTable.Id_gender_male);
+ RadioButton female = (RadioButton) findComponentById(ResourceTable.Id_gender_female);
+ Button signup = (Button) findComponentById(ResourceTable.Id_signup_btn);
+ Button login = (Button) findComponentById(ResourceTable.Id_login_btn);
+ Text er1 = (Text) findComponentById(ResourceTable.Id_er1);
+ Text er2 = (Text) findComponentById(ResourceTable.Id_er2);
+ Text er3 = (Text) findComponentById(ResourceTable.Id_er3);
+ Text er4 = (Text) findComponentById(ResourceTable.Id_er4);
+ Text er5 = (Text) findComponentById(ResourceTable.Id_er5);
+ Text er6 = (Text) findComponentById(ResourceTable.Id_er6);
+
+ // All field cleared
+ firstname.setText("");
+ lastname.setText("");
+ email.setText("");
+ password.setText("");
+ mobile.setText("");
+ male.setChecked(false);
+ female.setChecked(false);
+ er1.setVisibility(Component.INVISIBLE);
+ er2.setVisibility(Component.INVISIBLE);
+ er3.setVisibility(Component.INVISIBLE);
+ er4.setVisibility(Component.INVISIBLE);
+ er5.setVisibility(Component.INVISIBLE);
+ er6.setVisibility(Component.INVISIBLE);
+
+ DatabaseHelper helper = new DatabaseHelper(Signup.this);
+ OrmContext context = helper.getOrmContext(getString(ResourceTable.String_alias), getString(ResourceTable.String_db_name), Data.class);
+ User user = new User();
+ firstname.setFocusChangedListener((component, isFocused) -> {
+ String name = firstname.getText();
+ if (!isFocused) {
+ if (!name.matches(getString(ResourceTable.String_name_regex))) {
+
+ er1.setVisibility(Component.VISIBLE);
+ }
+ else
+ {
+ er1.setVisibility(Component.INVISIBLE);
+ }
+
+ }
+ });
+
+ male.setClickedListener(new Component.ClickedListener() {
+ @Override
+ public void onClick(Component component) {
+ female.setChecked(false);
+ }
+ });
+
+ female.setClickedListener(new Component.ClickedListener() {
+ @Override
+ public void onClick(Component component) {
+ male.setChecked(false);
+ }
+ });
+
+ lastname.setFocusChangedListener((component, isFocused) -> {
+ String name = lastname.getText();
+ if (!isFocused) {
+ if (!name.matches(getString(ResourceTable.String_name_regex))) {
+
+
+ er2.setVisibility(Component.VISIBLE);
+ }
+ else
+ {
+
+ er2.setVisibility(Component.INVISIBLE);
+ }
+
+ }
+ });
+
+
+ email.setFocusChangedListener((component, isFocused) -> {
+ String name = email.getText();
+ if (!isFocused) {
+ if (!name.matches(getString(ResourceTable.String_email_regex))) {
+
+ er3.setVisibility(Component.VISIBLE);
+ }
+ else
+ {
+
+ er3.setVisibility(Component.INVISIBLE);
+ }
+
+ }
+ });
+
+ password.setFocusChangedListener((component, isFocused) -> {
+ String name = password.getText();
+ if (!isFocused) {
+ if (!name.matches(getString(ResourceTable.String_pass_regex))) {
+
+ er4.setVisibility(Component.VISIBLE);
+ }
+ else
+ {
+
+ er4.setVisibility(Component.INVISIBLE);
+ }
+
+ }
+ });
+
+ mobile.setFocusChangedListener((component, isFocused) -> {
+ String name = mobile.getText();
+ if (!isFocused) {
+ if (!name.matches(getString(ResourceTable.String_mobile_regex))) {
+
+
+ er5.setVisibility(Component.VISIBLE);
+ }
+ else
+ {
+
+ er5.setVisibility(Component.INVISIBLE);
+ }
+
+ }
+ });
+
+
+ login.setClickedListener(List -> present(new Login(),new Intent()));
+
+ signup.setClickedListener(new Component.ClickedListener() {
+ @Override
+ public void onClick(Component component) {
+ if ((!male.isChecked()) && (!female.isChecked()) )
+ {
+ er6.setVisibility(Component.VISIBLE);
+ }
+ else
+ {
+ er6.setVisibility(Component.INVISIBLE);
+ }
+
+ // checking if focus was on some feild and signup btn pressed, verifying that data format
+ //
+ if (firstname.getText().matches(getString(ResourceTable.String_name_regex))) {
+ er1.setVisibility(Component.INVISIBLE);
+ }
+ else
+ {
+ er1.setVisibility(Component.VISIBLE);
+ }
+ if (lastname.getText().matches(getString(ResourceTable.String_name_regex))) {
+
+ er2.setVisibility(Component.INVISIBLE);
+ }else
+ {
+ er2.setVisibility(Component.VISIBLE);
+ }
+ if (email.getText().matches(getString(ResourceTable.String_email_regex))) {
+
+ er3.setVisibility(Component.INVISIBLE);
+ }else
+ {
+ er3.setVisibility(Component.VISIBLE);
+ }
+ if (password.getText().matches(getString(ResourceTable.String_pass_regex))) {
+
+ er4.setVisibility(Component.INVISIBLE);
+ }else
+ {
+ er4.setVisibility(Component.VISIBLE);
+ }
+ if (mobile.getText().matches(getString(ResourceTable.String_mobile_regex))) {
+
+ er5.setVisibility(Component.INVISIBLE);
+ }else
+ {
+ er5.setVisibility(Component.VISIBLE);
+ }
+
+
+ // Checking If anything empty
+
+ if(email.getText().equals("") || password.getText().equals("") || firstname.getText().equals("") || lastname.getText().equals("") || mobile.getText().equals(""))
+ {
+ new ToastDialog(getContext()).setText("Enter All Data").show();
+ //present(new Signup(), new Intent());
+ }
+ else if(er1.getVisibility()==0 || er2.getVisibility()==0 || er3.getVisibility()==0 || er4.getVisibility()==0 || er5.getVisibility()==0 || er6.getVisibility()==0)
+ {
+ new ToastDialog(getContext()).setText(getString(ResourceTable.String_correct_data)).show();
+ }
+
+ else {
+ OrmPredicates query = context.where(User.class).equalTo("DB_COLUMN_EMAIL", email.getText());
+ List users = context.query(query);
+ if (users.size() == 0) {
+
+ user.setDB_COLUMN_FIRST_NAME(firstname.getText());
+ if (male.isChecked()) {
+ user.setDB_COLUMN_GENDER(getString(ResourceTable.String_male));
+
+ }
+ else {
+ user.setDB_COLUMN_GENDER(getString(ResourceTable.String_female));
+ }
+ user.setDB_COLUMN_PASSWORD(password.getText());
+ user.setDB_COLUMN_LAST_NAME(lastname.getText());
+ user.setDB_COLUMN_MOBILE(mobile.getText());
+ user.setDB_COLUMN_EMAIL(email.getText());
+ try {
+ boolean isSuccessed = context.insert(user);
+ isSuccessed = context.flush();
+ //present(new MainAbilitySlice(), new Intent());
+ //new ToastDialog(getContext()).setText("Success").show();
+ showCommonDialog(email.getText(),password.getText());
+ //present(new MainAbilitySlice(),new Intent());
+ } catch (Exception e) {
+ new ToastDialog(getContext()).setText("Used Email").show();
+ email.setText("");
+ //present(new Signup(), new Intent());
+ }
+ } else {
+ new ToastDialog(getContext()).setText("Email used").show();
+ email.setText("");
+ //present(new MainAbilitySlice(), new Intent());
+ }
+ }
+ }
+ });
+ }
+
+ private void showCommonDialog(String email, String pass) {
+ CommonDialog commonDialog = new CommonDialog(this);
+ commonDialog.setTitleText(getString(ResourceTable.String_dialog_title));
+ commonDialog.setContentText(getString(ResourceTable.String_dialog_text));
+ commonDialog.setAutoClosable(true);
+ commonDialog.setSize(DIALOG_BOX_WIDTH, MATCH_CONTENT);
+ commonDialog.setButton(IDialog.BUTTON1,"YES",(iDialog, i) -> {
+ Intent intent1= new Intent();
+ intent1.setParam(getString(ResourceTable.String_em),email);
+ intent1.setParam(getString(ResourceTable.String_pas),pass);
+ present(new Login(),intent1);
+ iDialog.destroy();
+ });
+ commonDialog.setButton(IDialog.BUTTON2, "No", (iDialog, i) -> {
+ showToast(getString(ResourceTable.String_dialog_no_click));
+ iDialog.destroy();
+ present(new Signup(), new Intent());
+ });
+ commonDialog.show();
+ }
+ private void showToast(String msg) {
+ new ToastDialog(this).setText(msg).setDuration(500).show();
+ }
+}
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/element/color.json b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/element/color.json
new file mode 100644
index 00000000..17f812bb
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/element/color.json
@@ -0,0 +1,16 @@
+{
+ "color": [
+ {
+ "name": "white",
+ "value": "#ffffff"
+ },
+ {
+ "name": "blue",
+ "value": "#0000ff"
+ },
+ {
+ "name": "black",
+ "value": "#000000"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/element/string.json b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/element/string.json
new file mode 100644
index 00000000..261eefac
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/element/string.json
@@ -0,0 +1,96 @@
+{
+ "string": [
+ {
+ "name": "app_name",
+ "value": "assignment_app"
+ },
+ {
+ "name": "mainability_description",
+ "value": "Java_Phone_Empty Feature Ability"
+ },
+ {
+ "name": "mainability_HelloWorld",
+ "value": "YOLO"
+ },
+ {
+ "name": "persondataability_description",
+ "value": "hap sample empty provider"
+ },
+ {
+ "name": "pass_regex",
+ "value": "^.{5,}$"
+ },
+ {
+ "name": "name_regex",
+ "value":"^[a-zA-Z]+$"
+ },
+ {
+ "name": "email_regex",
+ "value": "^[a-zA-Z0-9+_.-]+@[a-zA-Z0-9.-]+$"
+ },
+ {
+ "name": "mobile_regex",
+ "value": "^[0-9]{10}$"
+ },
+ {
+ "name": "alias",
+ "value": "Data"
+ },
+ {
+ "name": "db_name",
+ "value": "Data.db"
+ },
+ {
+ "name": "male",
+ "value": "Male"
+ },
+ {
+ "name": "female",
+ "value": "Female"
+ },
+ {
+ "name": "yes",
+ "value": "Yes"
+ },
+ {
+ "name": "no",
+ "value": "No"
+ },
+ {
+ "name": "error_toast",
+ "value": "Email or Password did not matched"
+ },
+ {
+ "name": "em",
+ "value": "em"
+ },
+ {
+ "name": "pas",
+ "value": "pas"
+ },
+ {
+ "name": "feild",
+ "value": "Enter All feilds"
+ },
+ {
+ "name": "not_registered",
+ "value": "Email not registred"
+ },
+ {
+ "name": "dialog_text",
+ "value": "Go to Login page to enter the app?"
+ },
+ {
+ "name": "dialog_title",
+ "value": "Please Verify"
+ },
+ {
+ "name": "dialog_no_click",
+ "value":"Clicked No button"
+ },
+ {
+ "name": "correct_data",
+ "value": "Enter Correct data and gender"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/graphic/background_ability_main.xml b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/graphic/background_ability_main.xml
new file mode 100644
index 00000000..c0c0a3df
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/graphic/background_ability_main.xml
@@ -0,0 +1,6 @@
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/graphic/button_back.xml b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/graphic/button_back.xml
new file mode 100644
index 00000000..75ad41f1
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/graphic/button_back.xml
@@ -0,0 +1,6 @@
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/ability_main.xml b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/ability_main.xml
new file mode 100644
index 00000000..b8bcb1c1
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/ability_main.xml
@@ -0,0 +1,78 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/dashboard.xml b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/dashboard.xml
new file mode 100644
index 00000000..0cb996f9
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/dashboard.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/login.xml b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/login.xml
new file mode 100644
index 00000000..bd55b9a0
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/login.xml
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/signup.xml b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/signup.xml
new file mode 100644
index 00000000..d73dd141
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/signup.xml
@@ -0,0 +1,238 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/toast.xml b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/toast.xml
new file mode 100644
index 00000000..69e5b915
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/layout/toast.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/media/email.png b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/media/email.png
new file mode 100644
index 00000000..a579780f
Binary files /dev/null and b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/media/email.png differ
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/media/icon.png b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/media/icon.png
new file mode 100644
index 00000000..ce307a88
Binary files /dev/null and b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/main/resources/base/media/icon.png differ
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/ohosTest/config.json b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/ohosTest/config.json
new file mode 100644
index 00000000..df78b724
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/ohosTest/config.json
@@ -0,0 +1,41 @@
+{
+ "app": {
+ "bundleName": "com.example.assignment_app",
+ "vendor": "example",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ },
+ "apiVersion": {
+ "compatible": 4,
+ "target": 5,
+ "releaseType": "Release"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.example.assignment_app",
+ "name": "testModule",
+ "deviceType": [
+ "phone"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "entry_test",
+ "moduleType": "feature",
+ "installationFree": true
+ },
+ "abilities": [
+ {
+ "name": "decc.testkit.runner.EntryAbility",
+ "description": "Test Entry Ability",
+ "icon": "$media:icon",
+ "label": "$string:app_name",
+ "launchType": "standard",
+ "orientation": "landscape",
+ "visible": true,
+ "type": "page"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/ohosTest/java/com/example/assignment_app/ExampleOhosTest.java b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/ohosTest/java/com/example/assignment_app/ExampleOhosTest.java
new file mode 100644
index 00000000..63d3e103
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/ohosTest/java/com/example/assignment_app/ExampleOhosTest.java
@@ -0,0 +1,14 @@
+package com.example.assignment_app;
+
+import ohos.aafwk.ability.delegation.AbilityDelegatorRegistry;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+public class ExampleOhosTest {
+ @Test
+ public void testBundleName() {
+ final String actualBundleName = AbilityDelegatorRegistry.getArguments().getTestBundleName();
+ assertEquals("com.example.assignment_app", actualBundleName);
+ }
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/test/java/com/example/assignment_app/ExampleTest.java b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/test/java/com/example/assignment_app/ExampleTest.java
new file mode 100644
index 00000000..154924d0
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/entry/src/test/java/com/example/assignment_app/ExampleTest.java
@@ -0,0 +1,9 @@
+package com.example.assignment_app;
+
+import org.junit.Test;
+
+public class ExampleTest {
+ @Test
+ public void onStart() {
+ }
+}
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/gradle.properties b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/gradle.properties
new file mode 100644
index 00000000..0daf1830
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/gradle.properties
@@ -0,0 +1,10 @@
+# Project-wide Gradle settings.
+# IDE (e.g. DevEco Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+# If the Chinese output is garbled, please configure the following parameter.
+# org.gradle.jvmargs=-Dfile.encoding=GBK
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/gradle/wrapper/gradle-wrapper.jar b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 00000000..490fda85
Binary files /dev/null and b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/gradle/wrapper/gradle-wrapper.properties b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000..f59159e8
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://repo.huaweicloud.com/gradle/gradle-6.3-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/gradlew b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/gradlew
new file mode 100644
index 00000000..2fe81a7d
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/gradlew
@@ -0,0 +1,183 @@
+#!/usr/bin/env sh
+
+#
+# Copyright 2015 the original author or authors.
+#
+# 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
+#
+# https://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.
+#
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=`expr $i + 1`
+ done
+ case $i in
+ 0) set -- ;;
+ 1) set -- "$args0" ;;
+ 2) set -- "$args0" "$args1" ;;
+ 3) set -- "$args0" "$args1" "$args2" ;;
+ 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=`save "$@"`
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+exec "$JAVACMD" "$@"
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/gradlew.bat b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/gradlew.bat
new file mode 100644
index 00000000..62bd9b9c
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/gradlew.bat
@@ -0,0 +1,103 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/settings.gradle b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/settings.gradle
new file mode 100644
index 00000000..4773db73
--- /dev/null
+++ b/HarmonyOS/Day5 Assingment/Alpesh/assignment_app/settings.gradle
@@ -0,0 +1 @@
+include ':entry'