diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.gitignore b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.gitignore
new file mode 100644
index 00000000..37a4eb8b
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.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/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/.gitignore b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/.gitignore
new file mode 100644
index 00000000..26d33521
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/compiler.xml b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/compiler.xml
new file mode 100644
index 00000000..61a9130c
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/compiler.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/gradle.xml b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/gradle.xml
new file mode 100644
index 00000000..b9090f42
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/gradle.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/jarRepositories.xml b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/jarRepositories.xml
new file mode 100644
index 00000000..1dfcd020
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/jarRepositories.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/misc.xml b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/misc.xml
new file mode 100644
index 00000000..58918f50
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/previewer/phone/phoneSettingConfig_-20355998.json b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/previewer/phone/phoneSettingConfig_-20355998.json
new file mode 100644
index 00000000..69beee7f
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/previewer/phone/phoneSettingConfig_-20355998.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/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/previewer/phone/phoneSettingConfig_26419975.json b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/previewer/phone/phoneSettingConfig_26419975.json
new file mode 100644
index 00000000..f505e6b9
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/previewer/phone/phoneSettingConfig_26419975.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/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/previewer/previewConfig.json b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/previewer/previewConfig.json
new file mode 100644
index 00000000..88a0a669
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/previewer/previewConfig.json
@@ -0,0 +1,12 @@
+{
+ "1.0.0": {
+ "LastPreviewDevice": {
+ "C:\\Users\\shivam.jamaiwar\\DevEcoStudioProjects\\MyFirstApplication\\entry": [
+ "phone"
+ ],
+ "D:\\Application Library Group\\HMOS Assigment\\assessment\\HarmonyOS\\Day1 Assingment\\Shivam Jamaiwar\\MyFirstApplication\\entry": [
+ "phone"
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/vcs.xml b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/vcs.xml
new file mode 100644
index 00000000..4fce1d86
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/build.gradle b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/build.gradle
new file mode 100644
index 00000000..d3c9f1fe
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/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 5
+ }
+}
+
+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.4.2'
+ 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/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/.gitignore b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/.gitignore
new file mode 100644
index 00000000..796b96d1
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/build.gradle b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/build.gradle
new file mode 100644
index 00000000..88cd0b76
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/build.gradle
@@ -0,0 +1,40 @@
+apply plugin: 'com.huawei.ohos.hap'
+apply plugin: 'com.huawei.ohos.decctest'
+ohos {
+ compileSdkVersion 5
+ defaultConfig {
+ compatibleSdkVersion 5
+ }
+ 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'
+
+ compile files(
+ "C:\\Users\\shivam.jamaiwar\\AppData\\Local\\Huawei\\Sdk\\java\\2.1.1.21\\api\\ohos.jar",
+ "C:\\Users\\shivam.jamaiwar\\AppData\\Local\\Huawei\\Sdk\\java\\2.1.1.21\\build-tools\\lib\\orm_annotations_java.jar",
+ "C:\\Users\\shivam.jamaiwar\\AppData\\Local\\Huawei\\Sdk\\java\\2.1.1.21\\build-tools\\lib\\orm_annotations_processor_java.jar",
+ "C:\\Users\\shivam.jamaiwar\\AppData\\Local\\Huawei\\Sdk\\java\\2.1.1.21\\build-tools\\lib\\javapoet_java.jar"
+ )
+ annotationProcessor files(
+ "C:\\Users\\shivam.jamaiwar\\AppData\\Local\\Huawei\\Sdk\\java\\2.1.1.21\\build-tools\\lib\\orm_annotations_java.jar",
+ "C:\\Users\\shivam.jamaiwar\\AppData\\Local\\Huawei\\Sdk\\java\\2.1.1.21\\build-tools\\lib\\orm_annotations_processor_java.jar",
+ "C:\\Users\\shivam.jamaiwar\\AppData\\Local\\Huawei\\Sdk\\java\\2.1.1.21\\build-tools\\lib\\javapoet_java.jar"
+ )
+}
+decc {
+ supportType = ['html','xml']
+}
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/proguard-rules.pro b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/proguard-rules.pro
new file mode 100644
index 00000000..f7666e47
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/proguard-rules.pro
@@ -0,0 +1 @@
+# config module specific ProGuard rules here.
\ No newline at end of file
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/config.json b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/config.json
new file mode 100644
index 00000000..5f0d1528
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/config.json
@@ -0,0 +1,76 @@
+{
+ "app": {
+ "bundleName": "com.example.myfirstapplication",
+ "vendor": "example",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ },
+ "apiVersion": {
+ "compatible": 5,
+ "target": 5,
+ "releaseType": "Release"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.example.myfirstapplication",
+ "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.myfirstapplication.MainAbility",
+ "icon": "$media:icon",
+ "description": "$string:mainability_description",
+ "label": "$string:app_name",
+ "type": "page",
+ "launchType": "standard"
+ },
+ {
+ "orientation": "unspecified",
+ "name": "com.example.myfirstapplication.LoginAbility",
+ "icon": "$media:icon",
+ "description": "$string:secondability_description",
+ "label": "$string:title_login",
+ "type": "page",
+ "launchType": "standard"
+ },
+ {
+ "orientation": "unspecified",
+ "name": "com.example.myfirstapplication.SignupAbility",
+ "icon": "$media:icon",
+ "description": "$string:signupability_description",
+ "label": "$string:title_signup",
+ "type": "page",
+ "launchType": "standard"
+ },
+ {
+ "orientation": "unspecified",
+ "name": "com.example.myfirstapplication.HomeAbility",
+ "icon": "$media:icon",
+ "description": "$string:homeability_description",
+ "label": "$string:title_home",
+ "type": "page",
+ "launchType": "standard"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/HomeAbility.java b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/HomeAbility.java
new file mode 100644
index 00000000..530e755e
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/HomeAbility.java
@@ -0,0 +1,13 @@
+package com.example.myfirstapplication;
+
+import com.example.myfirstapplication.slice.HomeAbilitySlice;
+import ohos.aafwk.ability.Ability;
+import ohos.aafwk.content.Intent;
+
+public class HomeAbility extends Ability {
+ @Override
+ public void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setMainRoute(HomeAbilitySlice.class.getName());
+ }
+}
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/LoginAbility.java b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/LoginAbility.java
new file mode 100644
index 00000000..a5aa43bf
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/LoginAbility.java
@@ -0,0 +1,13 @@
+package com.example.myfirstapplication;
+
+import com.example.myfirstapplication.slice.LoginAbilitySlice;
+import ohos.aafwk.ability.Ability;
+import ohos.aafwk.content.Intent;
+
+public class LoginAbility extends Ability {
+ @Override
+ public void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setMainRoute(LoginAbilitySlice.class.getName());
+ }
+}
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/MainAbility.java b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/MainAbility.java
new file mode 100644
index 00000000..b75c5556
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/MainAbility.java
@@ -0,0 +1,14 @@
+package com.example.myfirstapplication;
+
+import com.example.myfirstapplication.rdb.RdbHelper;
+import com.example.myfirstapplication.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/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/MyApplication.java b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/MyApplication.java
new file mode 100644
index 00000000..7070a8f2
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/MyApplication.java
@@ -0,0 +1,10 @@
+package com.example.myfirstapplication;
+
+import ohos.aafwk.ability.AbilityPackage;
+
+public class MyApplication extends AbilityPackage {
+ @Override
+ public void onInitialize() {
+ super.onInitialize();
+ }
+}
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/SignupAbility.java b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/SignupAbility.java
new file mode 100644
index 00000000..abe93f59
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/SignupAbility.java
@@ -0,0 +1,13 @@
+package com.example.myfirstapplication;
+
+import com.example.myfirstapplication.slice.SignupAbilitySlice;
+import ohos.aafwk.ability.Ability;
+import ohos.aafwk.content.Intent;
+
+public class SignupAbility extends Ability {
+ @Override
+ public void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setMainRoute(SignupAbilitySlice.class.getName());
+ }
+}
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/Utils.java b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/Utils.java
new file mode 100644
index 00000000..f066e311
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/Utils.java
@@ -0,0 +1,43 @@
+package com.example.myfirstapplication;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class Utils {
+
+ /**
+ * check entered mail id is correct or not
+ *
+ * @param email entered mail id
+ * @return boolean value, if entered mail id is correct return true otherwise return false
+ */
+ public static boolean checkEmail(String email) {
+ if (email == null) {
+ return false;
+ }
+ Pattern pattern;
+ Matcher matcher;
+ final String EMAIL_PATTERN = "^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$";
+ pattern = Pattern.compile(EMAIL_PATTERN);
+ matcher = pattern.matcher(email);
+ return matcher.matches();
+ }
+
+ /**
+ * check entered contact no is correct or not
+ *
+ * @param contact entered contact no.
+ * @return
+ */
+ public static boolean checkMobileNo(String contact) {
+ if (contact == null) {
+ return false;
+ }
+ Pattern pattern;
+ Matcher matcher;
+ final String PHONE_PATTERN = "^[0-9]{10}$";
+ pattern = Pattern.compile(PHONE_PATTERN);
+ matcher = pattern.matcher(contact);
+ return matcher.matches();
+ }
+}
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/component/CustomComponent.java b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/component/CustomComponent.java
new file mode 100644
index 00000000..be978064
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/component/CustomComponent.java
@@ -0,0 +1,94 @@
+package com.example.myfirstapplication.component;
+
+import ohos.agp.components.AttrSet;
+import ohos.agp.components.Component;
+import ohos.agp.render.Canvas;
+import ohos.agp.render.Paint;
+import ohos.agp.utils.Color;
+import ohos.agp.utils.TextAlignment;
+import ohos.app.Context;
+import ohos.multimodalinput.event.TouchEvent;
+
+public class CustomComponent extends Component implements Component.DrawTask {
+
+ // Circle width
+ private static final float CIRCLE_STROKE_WIDTH = 100f;
+
+ private static final String BOOTSTRAP_CIRCLE_COLOR = "circleColor";
+ private static final String BOOTSTRAP_CIRCLE_LABEL = "circleLabel";
+ private static final String BOOTSTRAP_LABEL_COLOR = "labelColor";
+ private static final String BOOTSTRAP_CIRCLE_RADIUS = "radius";
+
+ // Paint for drawing the circle
+ private Paint circlePaint;
+
+ private String circleText = "Hello, I'm Green Circle";
+ private Color circleColor = Color.GREEN;
+ private Color labelColor = Color.BLACK;
+ private int radius = 100;
+
+ public CustomComponent(Context context) {
+ super(context);
+ init(null);
+ }
+
+ public CustomComponent(Context context, AttrSet attrSet) {
+ super(context, attrSet);
+ init(attrSet);
+ }
+
+ public CustomComponent(Context context, AttrSet attrSet, String styleName) {
+ super(context, attrSet, styleName);
+ init(attrSet);
+ }
+
+ private void init(AttrSet attrSet) {
+ circlePaint = new Paint();
+ if (attrSet != null) {
+ this.circleText = attrSet.getAttr(BOOTSTRAP_CIRCLE_LABEL).isPresent() ? attrSet.getAttr(
+ BOOTSTRAP_CIRCLE_LABEL).get().getStringValue() : "Hello, I'm Green Circle";
+ this.circleColor = attrSet.getAttr(BOOTSTRAP_CIRCLE_COLOR).isPresent() ? attrSet.getAttr(
+ BOOTSTRAP_CIRCLE_COLOR).get().getColorValue() : Color.GREEN;
+ this.labelColor = attrSet.getAttr(BOOTSTRAP_LABEL_COLOR).isPresent() ? attrSet.getAttr(
+ BOOTSTRAP_LABEL_COLOR).get().getColorValue() : Color.BLACK;
+ this.radius = attrSet.getAttr(BOOTSTRAP_CIRCLE_RADIUS).isPresent() ? attrSet.getAttr(
+ BOOTSTRAP_CIRCLE_RADIUS).get().getIntegerValue() : 100;
+
+ }
+ addDrawTask(this::onDraw);
+ }
+
+ @Override
+ public void onDraw(Component component, Canvas canvas) {
+ //get half of the width and height as we are working with a circle
+ int componentWidthHalf = getEstimatedWidth() / 4;
+ int componentHeightHalf = getEstimatedHeight() / 4;
+
+ //get the radius as half of the width or height, whichever is smaller
+ //subtract ten so that it has some space around it
+ /*int radius = 0;
+ if (componentWidthHalf > componentHeightHalf)
+ radius = componentWidthHalf;
+ else
+ radius = componentHeightHalf;*/
+
+ //set circle properties
+ circlePaint.setStyle(Paint.Style.FILL_STYLE);
+ circlePaint.setAntiAlias(true);
+ circlePaint.setColor(circleColor);
+
+ //draw the circle
+ canvas.drawCircle(getEstimatedWidth() / 2, getEstimatedHeight() / 2, radius, circlePaint);
+
+ //set the text color using the color specified
+ circlePaint.setColor(labelColor);
+
+ //set text properties
+ circlePaint.setTextAlign(TextAlignment.CENTER);
+ circlePaint.setTextSize(50);
+
+ //draw the text using the string attribute and chosen properties
+ canvas.drawText(circlePaint, circleText, getEstimatedWidth() / 2, getEstimatedHeight() / 2);
+ }
+
+}
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/component/CustomOvalButton.java b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/component/CustomOvalButton.java
new file mode 100644
index 00000000..8ceee805
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/component/CustomOvalButton.java
@@ -0,0 +1,87 @@
+package com.example.myfirstapplication.component;
+
+import ohos.agp.components.AttrSet;
+import ohos.agp.components.Button;
+import ohos.agp.components.Component;
+import ohos.agp.render.Canvas;
+import ohos.agp.render.Paint;
+import ohos.agp.utils.Color;
+import ohos.agp.utils.Rect;
+import ohos.agp.utils.RectFloat;
+import ohos.agp.utils.TextAlignment;
+import ohos.app.Context;
+
+public class CustomOvalButton extends Component implements Component.DrawTask {
+
+ private static final String BOOTSTRAP_BUTTON_COLOR = "buttonColor";
+ private static final String BOOTSTRAP_BUTTON_TEXT = "text";
+ private static final String BOOTSTRAP_BUTTON_TEXT_COLOR = "textColor";
+ private static final String BOOTSTRAP_BUTTON_TEXT_SIZE = "textSize";
+
+ // Paint for drawing the circle
+ private Paint ovalPaint, textPaint;
+
+ private String text = "Okay";
+ private Color buttonColor = Color.GREEN;
+ private Color textColor = Color.BLACK;
+ private int textSize = 50;
+
+ public CustomOvalButton(Context context) {
+ super(context);
+ init(null);
+ }
+
+ public CustomOvalButton(Context context, AttrSet attrSet) {
+ super(context, attrSet);
+ init(attrSet);
+ }
+
+ public CustomOvalButton(Context context, AttrSet attrSet, String styleName) {
+ super(context, attrSet, styleName);
+ init(attrSet);
+ }
+
+ private void init(AttrSet attrSet) {
+ ovalPaint = new Paint();
+ textPaint = new Paint();
+ if (attrSet != null) {
+ this.text = attrSet.getAttr(BOOTSTRAP_BUTTON_TEXT).isPresent() ? attrSet.getAttr(
+ BOOTSTRAP_BUTTON_TEXT).get().getStringValue() : "Okay";
+ this.buttonColor = attrSet.getAttr(BOOTSTRAP_BUTTON_COLOR).isPresent() ? attrSet.getAttr(
+ BOOTSTRAP_BUTTON_COLOR).get().getColorValue() : Color.GREEN;
+ this.textColor = attrSet.getAttr(BOOTSTRAP_BUTTON_TEXT_COLOR).isPresent() ? attrSet.getAttr(
+ BOOTSTRAP_BUTTON_TEXT_COLOR).get().getColorValue() : Color.BLACK;
+ this.textSize = attrSet.getAttr(BOOTSTRAP_BUTTON_TEXT_SIZE).isPresent() ? attrSet.getAttr(
+ BOOTSTRAP_BUTTON_TEXT_SIZE).get().getIntegerValue() : 50;
+ }
+ addDrawTask(this::onDraw);
+ }
+
+ @Override
+ public void onDraw(Component component, Canvas canvas) {
+
+ component.setWidth(textSize * 6);
+ //set oval properties
+ ovalPaint.setColor(buttonColor);
+ ovalPaint.setStyle(Paint.Style.FILL_STYLE);
+ ovalPaint.setAntiAlias(true);
+
+ canvas.drawRoundRect(
+ new RectFloat(0, 0, component.getWidth(), component.getHeight()),
+ component.getHeight() / 2,
+ component.getHeight() / 2,
+ ovalPaint
+ );
+
+ //set the text color using the color specified
+ ovalPaint.setColor(textColor);
+ //set text properties
+ ovalPaint.setTextAlign(TextAlignment.CENTER);
+ ovalPaint.setTextSize(textSize);
+
+ //draw the text using the string attribute and chosen properties
+ canvas.drawText(ovalPaint, text, component.getWidth() / 2, (component.getHeight() + component.getMarginTop()) / 2);
+
+ }
+
+}
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/orm/User.java b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/orm/User.java
new file mode 100644
index 00000000..5986a9fe
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/orm/User.java
@@ -0,0 +1,81 @@
+package com.example.myfirstapplication.orm;
+
+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 = "user",
+ indices = {@Index(
+ value = {"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 userId;
+ private String firstName;
+ private String lastName;
+ private String email;
+ private String password;
+ private String mobile;
+ private int gender;
+
+ public Integer getUserId() {
+ return userId;
+ }
+
+ public void setUserId(Integer userId) {
+ this.userId = userId;
+ }
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ this.email = email;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+
+ public String getMobile() {
+ return mobile;
+ }
+
+ public void setMobile(String mobile) {
+ this.mobile = mobile;
+ }
+
+ public int getGender() {
+ return gender;
+ }
+
+ public void setGender(int gender) {
+ this.gender = gender;
+ }
+}
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/orm/UserStore.java b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/orm/UserStore.java
new file mode 100644
index 00000000..d519ebc6
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/orm/UserStore.java
@@ -0,0 +1,8 @@
+package com.example.myfirstapplication.orm;
+
+import ohos.data.orm.OrmDatabase;
+import ohos.data.orm.annotation.Database;
+
+@Database(entities = {User.class}, version = 1)
+public abstract class UserStore extends OrmDatabase {
+}
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/rdb/RdbHelper.java b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/rdb/RdbHelper.java
new file mode 100644
index 00000000..4061ae43
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/rdb/RdbHelper.java
@@ -0,0 +1,31 @@
+package com.example.myfirstapplication.rdb;
+
+import ohos.app.Context;
+import ohos.data.DatabaseHelper;
+import ohos.data.rdb.RdbOpenCallback;
+import ohos.data.rdb.RdbStore;
+import ohos.data.rdb.StoreConfig;
+
+public class RdbHelper extends DatabaseHelper {
+
+ private static final String TAG = RdbHelper.class.getSimpleName();
+
+ public RdbHelper(Context context) {
+ super(context);
+ }
+
+ private static RdbOpenCallback callback = new RdbOpenCallback() {
+ @Override
+ public void onCreate(RdbStore store) {
+ store.executeSql("CREATE TABLE IF NOT EXISTS test (id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL, age INTEGER, salary REAL, blobType BLOB)");
+ }
+ @Override
+ public void onUpgrade(RdbStore store, int oldVersion, int newVersion) {
+ }
+ };
+
+ public RdbStore initRdb() {
+ StoreConfig config = StoreConfig.newDefaultConfig("storeTest.db");
+ return getRdbStore(config, 1, callback, null);
+ }
+}
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/rdb/RdbUtils.java b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/rdb/RdbUtils.java
new file mode 100644
index 00000000..e969b48d
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/rdb/RdbUtils.java
@@ -0,0 +1,39 @@
+package com.example.myfirstapplication.rdb;
+
+import ohos.app.Context;
+import ohos.data.rdb.RdbPredicates;
+import ohos.data.rdb.RdbStore;
+import ohos.data.rdb.ValuesBucket;
+import ohos.data.resultset.ResultSet;
+import ohos.hiviewdfx.HiLog;
+import ohos.hiviewdfx.HiLogLabel;
+
+public class RdbUtils {
+
+ private static final String TAG = RdbUtils.class.getSimpleName();
+ RdbStore store;
+
+ public RdbUtils(Context context) {
+ store = new RdbHelper(context).initRdb();
+ }
+
+ public void insertData() {
+ ValuesBucket values = new ValuesBucket();
+ values.putInteger("id", 2);
+ values.putString("name", "Ritesh");
+ values.putInteger("age", 18);
+ values.putDouble("salary", 100.5);
+ values.putByteArray("blobType", new byte[] {1, 2, 3});
+ long id = store.insert("test", values);
+ HiLog.error(new HiLogLabel(0, 0, TAG), "Id: " + id);
+ }
+
+ public void getData() {
+ String[] columns = new String[] {"id", "name", "age", "salary"};
+ RdbPredicates rdbPredicates = new RdbPredicates("test").equalTo("age", 18).orderByAsc("salary");
+ ResultSet resultSet = store.query(rdbPredicates, columns);
+ HiLog.error(new HiLogLabel(0, 0, TAG), "Result Set: " + resultSet.toString());
+ boolean result = resultSet.goToNextRow();
+ HiLog.error(new HiLogLabel(0, 0, TAG), "Result: " + result);
+ }
+}
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/slice/HomeAbilitySlice.java b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/slice/HomeAbilitySlice.java
new file mode 100644
index 00000000..112cfdae
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/slice/HomeAbilitySlice.java
@@ -0,0 +1,23 @@
+package com.example.myfirstapplication.slice;
+
+import com.example.myfirstapplication.ResourceTable;
+import ohos.aafwk.ability.AbilitySlice;
+import ohos.aafwk.content.Intent;
+
+public class HomeAbilitySlice extends AbilitySlice {
+ @Override
+ public void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setUIContent(ResourceTable.Layout_ability_home);
+ }
+
+ @Override
+ public void onActive() {
+ super.onActive();
+ }
+
+ @Override
+ public void onForeground(Intent intent) {
+ super.onForeground(intent);
+ }
+}
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/slice/LoginAbilitySlice.java b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/slice/LoginAbilitySlice.java
new file mode 100644
index 00000000..23ec69c9
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/slice/LoginAbilitySlice.java
@@ -0,0 +1,126 @@
+package com.example.myfirstapplication.slice;
+
+import com.example.myfirstapplication.HomeAbility;
+import com.example.myfirstapplication.ResourceTable;
+import com.example.myfirstapplication.Utils;
+import com.example.myfirstapplication.component.CustomComponent;
+import com.example.myfirstapplication.orm.User;
+import com.example.myfirstapplication.orm.UserStore;
+import ohos.aafwk.ability.AbilitySlice;
+import ohos.aafwk.content.Intent;
+import ohos.aafwk.content.Operation;
+import ohos.agp.components.*;
+import ohos.agp.components.element.ShapeElement;
+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 LoginAbilitySlice extends AbilitySlice {
+
+ //Components
+ private TextField mTFEmail, mTFPassword;
+ private Text mTErrEmail, mTErrPassword;
+ private Button mBtnLogin;
+
+ @Override
+ public void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setUIContent(ResourceTable.Layout_ability_login);
+
+ initComponents();
+
+ mBtnLogin.setClickedListener(new Component.ClickedListener() {
+ @Override
+ public void onClick(Component component) {
+
+ if (validateData()) {
+
+ DatabaseHelper helper = new DatabaseHelper(LoginAbilitySlice.this);
+ // Parameter context is of the ohos.app.Context type. Do not use slice.getContext() to obtain the context. Instead, pass the slice directly; otherwise, an error occurs indicating that no class is found.
+ OrmContext context = helper.getOrmContext("UserStore", "userStore.db", UserStore.class);
+
+ OrmPredicates query = context.where(User.class)
+ .equalTo("email", mTFEmail.getText().trim())
+ .and()
+ .equalTo("password", mTFPassword.getText().trim());
+ List users = context.query(query);
+ if (users.isEmpty()) {
+ new ToastDialog(getContext())
+ .setText("Login Failed!")
+ .show();
+ } else {
+ new ToastDialog(getContext())
+ .setText("Login Success!")
+ .show();
+
+ Intent intent = new Intent();
+ intent.setParam("name", users.get(0).getFirstName() + " " + users.get(0).getLastName());
+
+ /*Operation operation = new Intent.OperationBuilder()
+ .withAbilityName(HomeAbility.class.getName())
+ .build();
+ intent.setOperation(operation);
+ startAbility(intent);*/
+
+ present(new HomeAbilitySlice(), intent);
+ }
+ }
+ }
+ });
+ }
+
+ private void initComponents() {
+ mTFEmail = (TextField) findComponentById(ResourceTable.Id_input_email);
+ mTFPassword = (TextField) findComponentById(ResourceTable.Id_input_password);
+
+ mTErrEmail = (Text) findComponentById(ResourceTable.Id_txt_err_email);
+ mTErrPassword = (Text) findComponentById(ResourceTable.Id_txt_err_password);
+
+ mBtnLogin = (Button) findComponentById(ResourceTable.Id_btn_login);
+ }
+
+ private boolean validateData() {
+ ShapeElement errorElement = new ShapeElement(this, ResourceTable.Graphic_background_text_field_error);
+ ShapeElement textFieldElement = new ShapeElement(this, ResourceTable.Graphic_background_text_field);
+
+ //Check email
+ if (mTFEmail.getText() == null || mTFEmail.getText().isEmpty()) {
+ mTFEmail.setBackground(errorElement);
+ mTErrEmail.setVisibility(Component.VISIBLE);
+ return false;
+ } else if (!Utils.checkEmail(mTFEmail.getText())){
+ mTFEmail.setBackground(errorElement);
+ mTErrEmail.setVisibility(Component.VISIBLE);
+ mTErrEmail.setText("Please enter valid email!");
+ return false;
+ } else {
+ mTFEmail.setBackground(textFieldElement);
+ mTErrEmail.setVisibility(Component.INVISIBLE);
+ }
+
+ //Check password
+ if (mTFPassword.getText() == null || mTFPassword.getText().isEmpty()) {
+ mTFPassword.setBackground(errorElement);
+ mTErrPassword.setVisibility(Component.VISIBLE);
+ return false;
+ } else {
+ mTFPassword.setBackground(textFieldElement);
+ mTErrPassword.setVisibility(Component.INVISIBLE);
+ }
+
+ return true;
+ }
+
+ @Override
+ public void onActive() {
+ super.onActive();
+ }
+
+ @Override
+ public void onForeground(Intent intent) {
+ super.onForeground(intent);
+ }
+}
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/slice/MainAbilitySlice.java b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/slice/MainAbilitySlice.java
new file mode 100644
index 00000000..ac5639b5
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/slice/MainAbilitySlice.java
@@ -0,0 +1,95 @@
+package com.example.myfirstapplication.slice;
+
+import com.example.myfirstapplication.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.Image;
+
+public class MainAbilitySlice extends AbilitySlice {
+
+ private Button mBtnLogin, mBtnSignup;
+ private Image mImgIcon;
+ private AnimatorValue iconAnimation;
+ private AnimatorProperty loginBtnAnimation, signUpBtnAnimation;
+ private AnimatorGroup animatorGroup;
+
+ @Override
+ public void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setUIContent(ResourceTable.Layout_ability_main);
+
+ mBtnLogin = (Button) findComponentById(ResourceTable.Id_btn_login);
+ mBtnSignup = (Button) findComponentById(ResourceTable.Id_btn_signup);
+ mImgIcon = (Image) findComponentById(ResourceTable.Id_icon);
+
+ mBtnLogin.setClickedListener(listener -> present(new LoginAbilitySlice(), new Intent()));
+ mBtnSignup.setClickedListener(listener -> present(new SignupAbilitySlice(), new Intent()));
+
+ animateComponents();
+
+ /*RdbUtils rdbUtils = new RdbUtils(this);
+ rdbUtils.insertData();
+ rdbUtils.getData();*/
+ }
+
+ private void animateComponents() {
+
+ //AnimatorValue Example
+ iconAnimation = new AnimatorValue();
+ iconAnimation.setDuration(2000);
+ iconAnimation.setLoopedCount(0);
+ iconAnimation.setCurveType(Animator.CurveType.BOUNCE);
+
+ iconAnimation.setValueUpdateListener(new AnimatorValue.ValueUpdateListener() {
+ @Override
+ public void onUpdate(AnimatorValue animatorValue, float value) {
+ //animating button position
+ mImgIcon.setContentPosition(mImgIcon.getContentPositionX(), (int) (500 * value));
+
+ //animating width and height
+ //targetButton1.setWidth((int) (500*value));
+ //targetButton1.setHeight((int) (500*value));
+
+ //animating alpha property
+ //targetButton1.setAlpha(value);
+ }
+ });
+ iconAnimation.start();
+
+ //AnimatorGroup Example
+ animatorGroup = new AnimatorGroup();
+ animatorGroup.runSerially(
+ mBtnLogin.createAnimatorProperty().
+ moveFromX(0).moveToX(mBtnLogin.getContentPositionX()),
+ mBtnSignup.createAnimatorProperty().
+ moveFromX(1000).moveToX(mBtnSignup.getContentPositionX())
+ );
+ animatorGroup.setDuration(2000);
+ animatorGroup.setLoopedCount(1);
+ animatorGroup.start();
+
+ //AnimatorProperty Example
+ /*loginBtnAnimation = mBtnLogin.createAnimatorProperty(); //0r button2Animation.setTarget(targetButton2)
+ loginBtnAnimation.setDuration(2000).moveFromX(0).moveToX(1000).alpha(0).setLoopedCount(1);
+ loginBtnAnimation.start();
+
+ signUpBtnAnimation = mBtnSignup.createAnimatorProperty(); //0r button2Animation.setTarget(targetButton2)
+ signUpBtnAnimation.setDuration(2000).moveFromX(1000).moveToX(500).alpha(0).setLoopedCount(1);
+ signUpBtnAnimation.start();*/
+ }
+
+ @Override
+ public void onActive() {
+ super.onActive();
+ }
+
+ @Override
+ public void onForeground(Intent intent) {
+ super.onForeground(intent);
+ }
+}
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/slice/SignupAbilitySlice.java b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/slice/SignupAbilitySlice.java
new file mode 100644
index 00000000..eadfa887
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/java/com/example/myfirstapplication/slice/SignupAbilitySlice.java
@@ -0,0 +1,174 @@
+package com.example.myfirstapplication.slice;
+
+import com.example.myfirstapplication.ResourceTable;
+import com.example.myfirstapplication.Utils;
+import com.example.myfirstapplication.orm.User;
+import com.example.myfirstapplication.orm.UserStore;
+import ohos.aafwk.ability.AbilitySlice;
+import ohos.aafwk.content.Intent;
+import ohos.agp.components.Button;
+import ohos.agp.components.Component;
+import ohos.agp.components.Text;
+import ohos.agp.components.TextField;
+import ohos.agp.components.element.ShapeElement;
+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 static ohos.agp.components.ComponentContainer.LayoutConfig.MATCH_CONTENT;
+
+public class SignupAbilitySlice extends AbilitySlice {
+
+ public static final int DIALOG_BOX_WIDTH = 984;
+
+ //Components
+ private TextField mTFFirstName, mTFLastName, mTFEmail, mTFPassword, mTFMobile;
+ private Text mTErrFirstName, mTErrLastName, mTErrEmail, mTErrPassword, mTErrMobile;
+ private Button mBtnSignup;
+
+ @Override
+ public void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setUIContent(ResourceTable.Layout_ability_signup);
+
+ initComponents();
+
+ mBtnSignup.setClickedListener(new Component.ClickedListener() {
+ @Override
+ public void onClick(Component component) {
+ if (validateData()) {
+ User user = new User();
+ user.setFirstName(mTFFirstName.getText().trim());
+ user.setLastName(mTFLastName.getText().trim());
+ user.setEmail(mTFEmail.getText().trim());
+ user.setPassword(mTFPassword.getText().trim());
+ user.setMobile(mTFMobile.getText().trim());
+
+
+ DatabaseHelper helper = new DatabaseHelper(SignupAbilitySlice.this);
+ // Parameter context is of the ohos.app.Context type. Do not use slice.getContext() to obtain the context. Instead, pass the slice directly; otherwise, an error occurs indicating that no class is found.
+ OrmContext context = helper.getOrmContext("UserStore", "userStore.db", UserStore.class);
+
+ boolean isSuccessed = context.insert(user);
+ isSuccessed = context.flush();
+
+ if (isSuccessed) {
+ new CommonDialog(getContext())
+ .setTitleText("SignUp success!!")
+ .setContentText("Go to login page to enter the app, Please confirm")
+ .setButton(IDialog.BUTTON1, "yes", (iDialog, i) -> {
+ present(new LoginAbilitySlice(), new Intent());
+ iDialog.destroy();
+ })
+ .setButton(IDialog.BUTTON2, "No", (iDialog, i) -> {
+ iDialog.destroy();
+ })
+ .setAutoClosable(true)
+ .setSize(DIALOG_BOX_WIDTH, MATCH_CONTENT)
+ .show();
+
+
+ new ToastDialog(getContext())
+ .setText("SignUp successful!")
+ .show();
+ }
+ }
+ }
+ });
+ }
+
+ private void initComponents() {
+ mTFFirstName = (TextField) findComponentById(ResourceTable.Id_input_first_name);
+ mTFLastName = (TextField) findComponentById(ResourceTable.Id_input_last_name);
+ mTFEmail = (TextField) findComponentById(ResourceTable.Id_input_email);
+ mTFPassword = (TextField) findComponentById(ResourceTable.Id_input_password);
+ mTFMobile = (TextField) findComponentById(ResourceTable.Id_input_mobile);
+
+ mTErrFirstName = (Text) findComponentById(ResourceTable.Id_txt_err_first_name);
+ mTErrLastName = (Text) findComponentById(ResourceTable.Id_txt_err_last_name);
+ mTErrEmail = (Text) findComponentById(ResourceTable.Id_txt_err_email);
+ mTErrPassword = (Text) findComponentById(ResourceTable.Id_txt_err_password);
+ mTErrMobile = (Text) findComponentById(ResourceTable.Id_txt_err_mobile);
+
+ mBtnSignup = (Button) findComponentById(ResourceTable.Id_btn_signup);
+ }
+
+ private boolean validateData() {
+ ShapeElement errorElement = new ShapeElement(this, ResourceTable.Graphic_background_text_field_error);
+ ShapeElement textFieldElement = new ShapeElement(this, ResourceTable.Graphic_background_text_field);
+
+ //Check first name
+ if (mTFFirstName.getText() == null || mTFFirstName.getText().isEmpty()) {
+ mTFFirstName.setBackground(errorElement);
+ mTErrFirstName.setVisibility(Component.VISIBLE);
+ return false;
+ } else {
+ mTFFirstName.setBackground(textFieldElement);
+ mTErrFirstName.setVisibility(Component.INVISIBLE);
+ }
+
+ //Check last name
+ if (mTFLastName.getText() == null || mTFLastName.getText().isEmpty()) {
+ mTFLastName.setBackground(errorElement);
+ mTErrLastName.setVisibility(Component.VISIBLE);
+ return false;
+ } else {
+ mTFLastName.setBackground(textFieldElement);
+ mTErrLastName.setVisibility(Component.INVISIBLE);
+ }
+
+ //Check email
+ if (mTFEmail.getText() == null || mTFEmail.getText().isEmpty()) {
+ mTFEmail.setBackground(errorElement);
+ mTErrEmail.setVisibility(Component.VISIBLE);
+ return false;
+ } else if (!Utils.checkEmail(mTFEmail.getText())){
+ mTFEmail.setBackground(errorElement);
+ mTErrEmail.setVisibility(Component.VISIBLE);
+ mTErrEmail.setText("Please enter valid email!");
+ return false;
+ } else {
+ mTFEmail.setBackground(textFieldElement);
+ mTErrEmail.setVisibility(Component.INVISIBLE);
+ }
+
+ //Check password
+ if (mTFPassword.getText() == null || mTFPassword.getText().isEmpty()) {
+ mTFPassword.setBackground(errorElement);
+ mTErrPassword.setVisibility(Component.VISIBLE);
+ return false;
+ } else {
+ mTFPassword.setBackground(textFieldElement);
+ mTErrPassword.setVisibility(Component.INVISIBLE);
+ }
+
+ //Check mobile
+ if (mTFMobile.getText() == null || mTFMobile.getText().isEmpty()) {
+ mTFMobile.setBackground(errorElement);
+ mTErrMobile.setVisibility(Component.VISIBLE);
+ return false;
+ } else if (Utils.checkMobileNo(mTFMobile.getText())) {
+ mTFMobile.setBackground(errorElement);
+ mTErrMobile.setVisibility(Component.VISIBLE);
+ mTErrMobile.setText("Please enter valid mobile no.!");
+ return false;
+ } else {
+ mTFMobile.setBackground(textFieldElement);
+ mTErrMobile.setVisibility(Component.INVISIBLE);
+ }
+
+ return true;
+ }
+
+ @Override
+ public void onActive() {
+ super.onActive();
+ }
+
+ @Override
+ public void onForeground(Intent intent) {
+ super.onForeground(intent);
+ }
+}
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/element/string.json b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/element/string.json
new file mode 100644
index 00000000..e5d8b81e
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/element/string.json
@@ -0,0 +1,60 @@
+{
+ "string": [
+ {
+ "name": "app_name",
+ "value": "MyFirstApplication"
+ },
+ {
+ "name": "title_login",
+ "value": "Login"
+ },
+ {
+ "name": "title_signup",
+ "value": "Signup"
+ },
+ {
+ "name": "mainability_description",
+ "value": "Java_Phone_Empty Feature Ability"
+ },
+ {
+ "name": "mainability_HelloWorld",
+ "value": "Hello World"
+ },
+ {
+ "name": "secondability_description",
+ "value": "Java_Phone_Empty Feature Ability"
+ },
+ {
+ "name": "loginability_login",
+ "value": "Login Ability"
+ },
+ {
+ "name": "mainability_button_login",
+ "value": "Login"
+ },
+ {
+ "name": "mainability_button_signup",
+ "value": "Signup"
+ },
+ {
+ "name": "signupability_description",
+ "value": "Java_Phone_Empty Feature Ability"
+ },
+ {
+ "name": "signupability_SignupAbility",
+ "value": "My App"
+ },
+ {
+ "name": "homeability_description",
+ "value": "Java_Phone_Empty Feature Ability"
+ },
+ {
+ "name": "homeability_welcome",
+ "value": "Welcome to Home"
+ },
+ {
+ "name": "title_home",
+ "value": "Home"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/graphic/background_ability_home.xml b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/graphic/background_ability_home.xml
new file mode 100644
index 00000000..a002c235
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/graphic/background_ability_home.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/graphic/background_ability_main.xml b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/graphic/background_ability_main.xml
new file mode 100644
index 00000000..c0c0a3df
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/graphic/background_ability_main.xml
@@ -0,0 +1,6 @@
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/graphic/background_ability_second.xml b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/graphic/background_ability_second.xml
new file mode 100644
index 00000000..a002c235
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/graphic/background_ability_second.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/graphic/background_ability_signup.xml b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/graphic/background_ability_signup.xml
new file mode 100644
index 00000000..a002c235
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/graphic/background_ability_signup.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/graphic/background_text_field.xml b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/graphic/background_text_field.xml
new file mode 100644
index 00000000..52f00e78
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/graphic/background_text_field.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/graphic/background_text_field_error.xml b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/graphic/background_text_field_error.xml
new file mode 100644
index 00000000..5977cb3b
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/graphic/background_text_field_error.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/layout/ability_home.xml b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/layout/ability_home.xml
new file mode 100644
index 00000000..2ff41be9
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/layout/ability_home.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/layout/ability_login.xml b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/layout/ability_login.xml
new file mode 100644
index 00000000..e7b41993
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/layout/ability_login.xml
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/layout/ability_main.xml b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/layout/ability_main.xml
new file mode 100644
index 00000000..f13cbece
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/layout/ability_main.xml
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/layout/ability_signup.xml b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/layout/ability_signup.xml
new file mode 100644
index 00000000..dfba27a9
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/layout/ability_signup.xml
@@ -0,0 +1,212 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/media/icon.png b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/media/icon.png
new file mode 100644
index 00000000..ce307a88
Binary files /dev/null and b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/media/icon.png differ
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/media/profile_person.png b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/media/profile_person.png
new file mode 100644
index 00000000..bb48acd4
Binary files /dev/null and b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/main/resources/base/media/profile_person.png differ
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/ohosTest/config.json b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/ohosTest/config.json
new file mode 100644
index 00000000..454ce15c
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/ohosTest/config.json
@@ -0,0 +1,41 @@
+{
+ "app": {
+ "bundleName": "com.example.myfirstapplication",
+ "vendor": "example",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ },
+ "apiVersion": {
+ "compatible": 5,
+ "target": 5,
+ "releaseType": "Release"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.example.myfirstapplication",
+ "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/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/ohosTest/java/com/example/myfirstapplication/ExampleOhosTest.java b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/ohosTest/java/com/example/myfirstapplication/ExampleOhosTest.java
new file mode 100644
index 00000000..595647cd
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/ohosTest/java/com/example/myfirstapplication/ExampleOhosTest.java
@@ -0,0 +1,14 @@
+package com.example.myfirstapplication;
+
+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.myfirstapplication", actualBundleName);
+ }
+}
\ No newline at end of file
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/test/java/com/example/myfirstapplication/ExampleTest.java b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/test/java/com/example/myfirstapplication/ExampleTest.java
new file mode 100644
index 00000000..4b2c49fc
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/entry/src/test/java/com/example/myfirstapplication/ExampleTest.java
@@ -0,0 +1,9 @@
+package com.example.myfirstapplication;
+
+import org.junit.Test;
+
+public class ExampleTest {
+ @Test
+ public void onStart() {
+ }
+}
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/gradle.properties b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/gradle.properties
new file mode 100644
index 00000000..0daf1830
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/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/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/gradle/wrapper/gradle-wrapper.jar b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 00000000..490fda85
Binary files /dev/null and b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/gradle/wrapper/gradle-wrapper.properties b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 00000000..f59159e8
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/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/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/gradlew b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/gradlew
new file mode 100644
index 00000000..2fe81a7d
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/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/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/gradlew.bat b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/gradlew.bat
new file mode 100644
index 00000000..62bd9b9c
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/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/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/settings.gradle b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/settings.gradle
new file mode 100644
index 00000000..4773db73
--- /dev/null
+++ b/HarmonyOS/Day1 Assingment/Shivam Jamaiwar/MyFirstApplication/settings.gradle
@@ -0,0 +1 @@
+include ':entry'