Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions HarshithaA_VITAP/Intents_and_Serialization/.gitignore
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions HarshithaA_VITAP/Intents_and_Serialization/.idea/.gitignore

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

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

6 changes: 6 additions & 0 deletions HarshithaA_VITAP/Intents_and_Serialization/.idea/compiler.xml

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

22 changes: 22 additions & 0 deletions HarshithaA_VITAP/Intents_and_Serialization/.idea/gradle.xml

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

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

4 changes: 4 additions & 0 deletions HarshithaA_VITAP/Intents_and_Serialization/.idea/misc.xml

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

38 changes: 38 additions & 0 deletions HarshithaA_VITAP/Intents_and_Serialization/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply plugin: 'com.huawei.ohos.app'

//For instructions on signature configuration, see https://developer.harmonyos.com/en/docs/documentation/doc-guides/ide_debug_device-0000001053822404#EN-US_TOPIC_0000001154985555__section1112183053510
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.4.2'
classpath 'com.huawei.ohos:decctest:1.2.4.0'
}
}

allprojects {
repositories {
maven {
url 'https://repo.huaweicloud.com/repository/maven/'
}
maven {
url 'https://developer.huawei.com/repo/'
}
jcenter()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
27 changes: 27 additions & 0 deletions HarshithaA_VITAP/Intents_and_Serialization/entry/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apply plugin: 'com.huawei.ohos.hap'
apply plugin: 'com.huawei.ohos.decctest'
//For instructions on signature configuration, see https://developer.harmonyos.com/en/docs/documentation/doc-guides/ide_debug_device-0000001053822404#EN-US_TOPIC_0000001154985555__section1112183053510
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']
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# config module specific ProGuard rules here.
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"app": {
"bundleName": "com.example.intents_and_serialization",
"vendor": "example",
"version": {
"code": 1000000,
"name": "1.0.0"
}
},
"deviceConfig": {},
"module": {
"package": "com.example.intents_and_serialization",
"name": ".MyApplication",
"mainAbility": "com.example.intents_and_serialization.MainAbility",
"deviceType": [
"phone",
"tablet",
"tv"
],
"distro": {
"deliveryWithInstall": true,
"moduleName": "entry",
"moduleType": "entry",
"installationFree": false
},
"abilities": [
{
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
],
"orientation": "unspecified",
"name": "com.example.intents_and_serialization.MainAbility",
"icon": "$media:icon",
"description": "$string:mainability_description",
"label": "$string:entry_MainAbility",
"type": "page",
"launchType": "standard"
},
{
"orientation": "unspecified",
"name": "com.example.intents_and_serialization.SecondAbility",
"icon": "$media:icon",
"description": "$string:secondability_description",
"label": "$string:entry_SecondAbility",
"type": "page",
"launchType": "standard"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.example.intents_and_serialization;

import com.example.intents_and_serialization.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());
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.example.intents_and_serialization;

import ohos.aafwk.ability.AbilityPackage;

public class MyApplication extends AbilityPackage {
@Override
public void onInitialize() {
super.onInitialize();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package com.example.intents_and_serialization;


import ohos.aafwk.ability.Ability;
import ohos.aafwk.content.Intent;
import ohos.agp.components.Text;


import static com.example.intents_and_serialization.ResourceTable.*;

public class SecondAbility extends Ability {

Text userInfoName;
Text userInfoDepartment;
Text userInfoUniversity;

@Override
public void onStart (Intent intent)
{
super.onStart(intent);
super.setUIContent(Layout_ability_next);
initViews(intent);
}
private void initViews (Intent intent)
{
userInfoName = (Text) findComponentById(Id_user_info_name);
userInfoDepartment = (Text) findComponentById(ResourceTable.Id_user_info_department);
userInfoUniversity = (Text) findComponentById(ResourceTable.Id_user_info_university);


if (intent != null) {
userInfoName.setText(intent.getStringParam("user_info_student_name"));
userInfoUniversity.setText(intent.getStringParam("user_info_university_name"));
userInfoDepartment.setText(intent.getStringParam("user_info_Department_name"));
}

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package com.example.intents_and_serialization.data;

public class User {
private String studentName;
private String rollNo;
private String departmentName;
private String collegeName;
private String universityName;

public void setStudentName(String studentName)
{
this. studentName = studentName;
}
public String getStudentName() {
return studentName;
}

public void setRollNo(String rollNo)
{
this.rollNo = rollNo;
}
public String getRollNo(){
return rollNo;
}

public void setDepartmentName(String departmentName)
{
this.departmentName = departmentName;
}
public String getDepartmentName(){
return departmentName;
}

public void setCollegeName(String collegeName){
this.collegeName = collegeName;
}
public String getCollegeName(){
return collegeName;
}

public void setUniversityName(String universityName) {this.universityName = universityName; }
public String getUniversityName() {return universityName;}
}
Loading