diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/.idea/.gitignore" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/.idea/.gitignore"
new file mode 100644
index 0000000000000000000000000000000000000000..26d33521af10bcc7fd8cea344038eaaeb78d0ef5
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/.idea/.gitignore"
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/.idea/gradle.xml" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/.idea/gradle.xml"
new file mode 100644
index 0000000000000000000000000000000000000000..4dada841fd8b88cfbf1b4b5398c63bb3e6c24ead
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/.idea/gradle.xml"
@@ -0,0 +1,16 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/.idea/modules.xml" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/.idea/modules.xml"
new file mode 100644
index 0000000000000000000000000000000000000000..fb68b24d0f5a986038051db7f9890b1838a325f6
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/.idea/modules.xml"
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/.idea/rentutu\347\232\204\346\226\207\344\273\266.iml" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/.idea/rentutu\347\232\204\346\226\207\344\273\266.iml"
new file mode 100644
index 0000000000000000000000000000000000000000..d6ebd4805981b8400db3e3291c74a743fef9a824
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/.idea/rentutu\347\232\204\346\226\207\344\273\266.iml"
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/.idea/vcs.xml" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/.idea/vcs.xml"
new file mode 100644
index 0000000000000000000000000000000000000000..8fc0cc3c32146d949de493f8b20f537a75105731
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/.idea/vcs.xml"
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/.keep" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/.keep"
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/.gitignore" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/.gitignore"
new file mode 100644
index 0000000000000000000000000000000000000000..fdc0c4a65db238be4186f16e1e0911b1d61fbf31
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/.gitignore"
@@ -0,0 +1,16 @@
+*.iml
+.gradle
+/local.properties
+/.idea/caches
+/.idea/libraries
+/.idea/modules.xml
+/.idea/workspace.xml
+/.idea/navEditor.xml
+/.idea/assetWizardSettings.xml
+.DS_Store
+/build
+/captures
+.externalNativeBuild
+/entry/.preview
+.cxx
+/node_modules
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/.idea/.gitignore" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/.idea/.gitignore"
new file mode 100644
index 0000000000000000000000000000000000000000..26d33521af10bcc7fd8cea344038eaaeb78d0ef5
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/.idea/.gitignore"
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/.idea/compiler.xml" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/.idea/compiler.xml"
new file mode 100644
index 0000000000000000000000000000000000000000..fb7f4a8a465d42b4a0390d464b83b99e8465bba7
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/.idea/compiler.xml"
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/.idea/gradle.xml" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/.idea/gradle.xml"
new file mode 100644
index 0000000000000000000000000000000000000000..a9efccf08dc0d083b3968ec7554ee2cf11369390
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/.idea/gradle.xml"
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/.idea/jarRepositories.xml" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/.idea/jarRepositories.xml"
new file mode 100644
index 0000000000000000000000000000000000000000..19e238eaa31f512cfc1e8641964227098d1eb8bb
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/.idea/jarRepositories.xml"
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/.idea/misc.xml" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/.idea/misc.xml"
new file mode 100644
index 0000000000000000000000000000000000000000..794aa67e635837ac492499857a20ce72f4938e28
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/.idea/misc.xml"
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/.idea/vcs.xml" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/.idea/vcs.xml"
new file mode 100644
index 0000000000000000000000000000000000000000..b2bdec2d71b6a5ce4ae49efc37516809c50e4d5e
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/.idea/vcs.xml"
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/README.md" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/README.md"
new file mode 100644
index 0000000000000000000000000000000000000000..37d5bc3a8b1e4c3fed232f1f58c1bda52149b23d
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/README.md"
@@ -0,0 +1,229 @@
+# 新闻流转模板的主旨:
+
+- 通过新闻应用场景展现鸿蒙系统的分布式调用能力,开发者使用本模板时可以重点关注流转流程的具体实现
+
+
+# 新闻流转模板的调试和使用
+
+- 本模板是双entry + 一个har包的结构,两个entry分别对应于手机和大屏两端,而har包作为公有库提供新闻读取、多端信息发送与接受的能力
+
+- 模板中新闻流转功能的路径:调用系统分布式能力拉起已经组网的其他设备上的新闻流转应用
+
+- 模板设计有两种新闻页面:
+
+ -JS开发新闻页面,具体页面entry/src/main/js/default/pages/detail/detail.js。
+
+ -Java端通过webview显示新闻网页,具体页面entry/src/main/java/../WebviewAbility
+ 注:若使用webview功能,需在配置文件config.json中添加权限请求ohos.permission.INTERNET。
+
+- 在具体使用时,考虑到开发者不一定拥有智慧屏作为开发设备。在手机端对应entry中的MainAbility提供了智慧屏debug模式
+
+ - 可以通过将手机和智慧屏两端的entry分别安装在两台手机上,并且在手机端entry中使能debug模式(设置enableDebugMode方法的返回值为true)
+ 来体验整个模板的完整功能;若体验手机间流转新闻,关闭debug模式(debugMode设置为false)。
+
+ - 注:手机端与大屏端因为系统的差异导致UI效果有些许差别,具体体现在智慧屏会自动为当前焦点绘制方框而手机端没有此特性。
+ 最终显示效果请以大屏端为参照。
+
+ - 当前实现远程启动FA需要至少两个设备处于同一个分布式网络中,可以通过操作如下配置实现:
+
+ - 所有设备接入同一网络
+
+ - 所有设备登陆相同华为账号
+
+ - 所有设备上开启设置”设置-更多连接-多设备协同“
+
+
+- 流转能力的规格限制:
+
+ - 调用系统分布式能力实现流转的规格:
+
+ - 双端设备系统需要同时具备分布式能力
+
+ - 手机可以向其他组网设备包括手机、智慧屏发起流转
+
+ - 智慧屏只能作为流转的接收方
+
+# 流转过程具体实现
+
+- 开发者在阅读代码时应该对以下方面有前置了解:
+
+ - JS UI框架实现的FA与继承自AceInternalAbility的PA的通信
+
+ - PA与JS UI框架实现的FA通过订阅(subscribe)机制进行通信
+
+- 基于系统能力实现新闻详情页中手机流转到大屏的流程(具体代码参考对应JS UI页面和对应调用的继承自AceInternalAbility的PA)
+
+ - 首先用户在新闻详情页面点击流转后页面跳转至设备选择界面,此处会显示出当前在线的其他已组网设备
+
+ - 获取组网设备代码段如下:
+
+ entry\src\main\java\..\DeviceSelectInternalAbility.ACTION_REQUEST_DEVICE_LIST
+
+ ```
+
+ List devices = DeviceManager.getDeviceList(DeviceInfo.FLAG_GET_ONLINE_DEVICE);
+
+ ```
+
+ - 用户选择流转设备,页面根据获取到的对端设备信息判断如果对端设备为智慧屏则跳转至遥控界面否则返回详情界面,并调用分布式拉起方法拉起对端应用
+
+ - 拉起对端FA的代码段如下:
+
+ - entry/src/main/js/default/pages/detail/detail.js
+
+ ```
+ async transfer() {
+ var forwardCompatible = false;
+ ---前向兼容检查 ---
+ .......
+ ---获取用户选择的流转设备
+ var result = await FeatureAbility.startAbilityForResult(target);
+ if (!!forwardCompatible == true) {
+ result = JSON.parse(result);
+ }
+ ......
+ ---调用系统分布式拉起能力,拉起对端新闻应用
+ var res1 = await FeatureAbility.startAbility(target);
+ if (!!forwardCompatible == true) {
+ res1 = JSON.parse(res1);
+ }
+ ......
+ ---判断对端设备类型决定是否进行跳转
+ if (res1.code == 0 && (targetDeviceType == 'SMART_TV' || deviceDebugMode == true)) {
+
+ ```
+
+ - 若对端为大屏设备,页面跳转至遥控器界面后设备会尝试与对端建立持续连接以此来传送后续的遥控信号
+ (通过remoteDataSenderAbility.java/connectRemote()方法中下调用系统方法connectAbility())
+
+ - 连接对端PA的代码段如下:
+
+ - DistributeInternalAbility(手机端)#CONNECT_ABILITY
+
+ ```
+ case CONNECT_ABILITY: {
+ ZSONObject dataParsed = ZSONObject.stringToZSON(data.readString());
+ selectDeviceId = dataParsed.getString("deviceId");
+ RemoteDataSender.connectRemote(selectDeviceId, context);
+ assembleReplyResult(replyResult, new Object(), reply);
+ break;
+ }
+ ```
+
+ - commonlib\src\main\java\..\remotedatabus\RemoteDataSender#connectRemote
+
+ ```
+ public static boolean connectRemote(String deviceId, Context context) {
+ RemoteConnection remote = REMOTE_CONNECTION_MAP.get(deviceId);
+ if (remote != null) {
+ context.disconnectAbility(remote);
+ REMOTE_CONNECTION_MAP.remove(deviceId);
+ }
+
+ RemoteConnection newRemote = new RemoteConnection();
+ Intent intent = new Intent();
+ Operation operation = new Intent.OperationBuilder()
+ .withDeviceId(deviceId)
+ .withBundleName(context.getBundleName())
+ .withAbilityName(RemoteDataReceiverAbility.class.getName())
+ .withFlags(Intent.FLAG_ABILITYSLICE_MULTI_DEVICE)
+ .build();
+
+ intent.setOperation(operation);
+ ---调用系统分布式能力与远端建立持续连接
+ boolean isSuccess = context.connectAbility(intent, newRemote);
+ HiLog.error(TAG, "connectRemote " + isSuccess);
+ if (isSuccess) {
+ REMOTE_CONNECTION_MAP.put(deviceId, newRemote);
+ }
+ return isSuccess;
+ }
+ ```
+
+ - 大屏端作为接收端接收到应用拉起请求后,处理接收到的参数并渲染新闻页面。同时主动订阅对应PA(通过subscribe机制)
+
+ - 大屏端接收手机端消息的代码段如下:
+
+ - default/pages/index/index.js(大屏端首页) 进入页面时主动订阅对应PA(DistributeInternalAbility)
+
+ ```
+ async subscribe() {
+ const subAction = {};
+ subAction.bundleName = 'com.example.middleplatform.newsshare.tv';
+ subAction.abilityName = 'DistributeInternalAbility';
+ subAction.messageCode = ACTION_MESSAGE_CODE_SUBSCRIBE;
+ subAction.abilityType = ABILITY_TYPE_INTERNAL;
+ subAction.syncOption = ACTION_SYNC;
+ await FeatureAbility.subscribeAbilityEvent(subAction, (callbackData) => {
+ const callbackJson = JSON.parse(callbackData);
+ const { message } = callbackJson.data;
+ if (message < MESSAGE_CODE_DISCRIMINATOR) {
+ this.handleCommand(message);
+ } else {
+ this.handleTVOperation(message);
+ }
+ });
+ },
+ ```
+ - DistributeInternalAbility.ACTION_MESSAGE_CODE_SUBSCRIBE PA接收订阅请求,初始化消息队列声明消息处理逻辑
+
+ ```
+ case ACTION_MESSAGE_CODE_SUBSCRIBE : {
+ remoteObjectHandler = data.readRemoteObject();
+ if (remoteMessageHandler == null) {
+ if (newRunner == null) {
+ newRunner = EventRunner.create(true); // 创建消息队列
+ }
+ remoteMessageHandler = makeEventHandler(); // 创建消息处理逻辑
+ RemoteDataReceiverAbility.registerMessageHandler(Command.COMMAND_TV,
+ (remoteData, remoteReply) -> {
+ remoteMessageHandler.sendEvent(remoteData.readInt());
+ remoteReply.writeInt(0); // 远端遥控指令处理
+ });
+ }
+ Map replyResult = new HashMap<>();
+ replyResult.put("code", 0);
+ reply.writeString(ZSONObject.toZSONString(replyResult));
+ break;
+ }
+ ```
+
+ - 大屏的PA在FA订阅成功后,在接收到远端发来的遥控信号时会将其处理并把结果加入消息队列发送给FA进行页面刷新
+
+ DistributeInternalAbility.makeEventHandler FA订阅PA后PA消息队列中的消息处理逻辑
+
+ - 手机端FA接收用户输入后向PA请求发送遥控指令至智慧屏端需要调用RemoteDataSender的消息发送能力
+
+ - entry\src\main\js\default\pages\remote_controller\controller.js FA请求PA向远端发送遥控指令
+
+ ```
+ async sendMsg(mesg) {
+ ......
+ const callAction = this.makeAction(ACTION_MESSAGE_CODE_SEND_MSG, actionData);
+ const result = await FeatureAbility.callAbility(callAction);
+ const ret = JSON.parse(result);
+ ......
+ },
+ ```
+
+ - DistributeInternalAbility(手机端)中向远端发送遥控指令,通过调用commonlib中的 RemoteDataSender的sendMessage方法
+
+ ```
+ case SEND_MSG: {
+ try {
+ ZSONObject dataParsed = ZSONObject.stringToZSON(data.readString());
+ int message = dataParsed.getIntValue("message");
+ int success = RemoteDataSender.sendMessage(selectDeviceId, Command.COMMAND_TV, message);
+ if (success == -1) {
+ boolean connectRes = RemoteDataSender.connectRemote(selectDeviceId, context);
+ if (!connectRes) {
+ throw new RemoteException();
+ }
+ }
+ assembleReplyResult(replyResult, new Object(), reply);
+ } catch (RemoteException e) {
+ HiLog.error(TAG, "DistributeInternalAbility Exception " + e);
+ }
+ break;
+ }
+ ```
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/build.gradle" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/build.gradle"
new file mode 100644
index 0000000000000000000000000000000000000000..7b262c269082b0d379749be22b21102d60415736
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/build.gradle"
@@ -0,0 +1,33 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+apply plugin: 'com.huawei.ohos.app'
+
+//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
+ohos {
+ compileSdkVersion 6
+}
+
+buildscript {
+ repositories {
+ maven {
+ url 'https://repo.huaweicloud.com/repository/maven/'
+ }
+ maven {
+ url 'https://developer.huawei.com/repo/'
+ }
+ }
+ dependencies {
+ classpath 'com.huawei.ohos:hap:3.0.3.2'
+ classpath 'com.huawei.ohos:decctest:1.2.6.0'
+ }
+}
+
+allprojects {
+ repositories {
+ maven {
+ url 'https://repo.huaweicloud.com/repository/maven/'
+ }
+ maven {
+ url 'https://developer.huawei.com/repo/'
+ }
+ }
+}
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/.gitignore" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/.gitignore"
new file mode 100644
index 0000000000000000000000000000000000000000..7d5b7a94f4dcf381f03ff21f28f8a2494b58023f
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/.gitignore"
@@ -0,0 +1,2 @@
+/build
+/node_modules
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/build.gradle" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/build.gradle"
new file mode 100644
index 0000000000000000000000000000000000000000..5dbf413466ea1bd3ac1aa7629bd1748b2f8c9409
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/build.gradle"
@@ -0,0 +1,20 @@
+apply plugin: 'com.huawei.ohos.library'
+
+ohos {
+ compileSdkVersion 6
+ defaultConfig {
+ compatibleSdkVersion 6
+ }
+ buildTypes {
+ release {
+ proguardOpt {
+ proguardEnabled false
+ rulesFiles 'proguard-rules.pro'
+ }
+ }
+ }
+}
+
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar','*.har'])
+}
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/consumer-rules.pro" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/consumer-rules.pro"
new file mode 100644
index 0000000000000000000000000000000000000000..9dccc613bc71b04b83531f550bdab2fb667ecfc9
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/consumer-rules.pro"
@@ -0,0 +1 @@
+# Add har specific ProGuard rules for consumer here.
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/proguard-rules.pro" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/proguard-rules.pro"
new file mode 100644
index 0000000000000000000000000000000000000000..f7666e47561d514b2a76d5a7dfbb43ede86da92a
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/proguard-rules.pro"
@@ -0,0 +1 @@
+# config module specific ProGuard rules here.
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/config.json" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/config.json"
new file mode 100644
index 0000000000000000000000000000000000000000..d79356d849f1b897e8c77887ea26d41749770acf
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/config.json"
@@ -0,0 +1,24 @@
+{
+ "app": {
+ "bundleName": "com.example.myapplication",
+ "vendor": "example",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ }
+ },
+ "deviceConfig": {
+ },
+ "module": {
+ "package": "com.example.myapplication",
+ "deviceType": [
+ "phone",
+ "tv"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "commonlib",
+ "moduleType": "har"
+ }
+ }
+}
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/java/com/example/myapplication/constant/Command.java" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/java/com/example/myapplication/constant/Command.java"
new file mode 100644
index 0000000000000000000000000000000000000000..5850b64a6f4c9bb5bab1e342597d6ed01422a3ac
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/java/com/example/myapplication/constant/Command.java"
@@ -0,0 +1,11 @@
+package com.example.myapplication.constant;
+
+/**
+ * message_code which send to TV.
+ */
+public class Command {
+ /**
+ * the message code of tv command
+ */
+ public static final int COMMAND_TV = 1;
+}
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/java/com/example/myapplication/newsdata/NewsInfo.java" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/java/com/example/myapplication/newsdata/NewsInfo.java"
new file mode 100644
index 0000000000000000000000000000000000000000..9f83780eca64f14a4909c95532b2d27390fdc512
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/java/com/example/myapplication/newsdata/NewsInfo.java"
@@ -0,0 +1,197 @@
+package com.example.myapplication.newsdata;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import ohos.app.Context;
+import ohos.global.resource.Resource;
+import ohos.hiviewdfx.HiLog;
+import ohos.hiviewdfx.HiLogLabel;
+import ohos.utils.zson.ZSONObject;
+
+/**
+ * newsInfo class, defined the newsInfo structure, and provide related method to read newsInfo from json.
+ * You can override this part to extend business logic, such as read from different data source
+ */
+public class NewsInfo {
+ private static final HiLogLabel TAG = new HiLogLabel(0, 0, "NewsInfo");
+ private static final String NEWS_FILE_PREFIX = "resources/rawfile/news";
+ private static final int NEWS_LIMIT = 10;
+ private static final int NEWS_CONTENT_SIZE = 1024;
+ private static final int EOF = -1;
+ private volatile static NewsInfo newsInfo;
+ private final Context context;
+ private final HashMap newsInfoMap = new HashMap<>();
+ private final ArrayList newsTitleList = new ArrayList<>();
+ private final ArrayList newsUrlList = new ArrayList<>();
+ private final ArrayList newsImageList = new ArrayList<>();
+ private final ArrayList newsContainsVideos = new ArrayList<>();
+ private final ArrayList newsVideoUrl = new ArrayList<>();
+ private final ArrayList newsContainsWeb = new ArrayList<>();
+ private final ArrayList newsWebList = new ArrayList<>();
+
+ /**
+ * default constructor
+ *
+ * @param context context
+ */
+ private NewsInfo(Context context) {
+ this.context = context;
+ int index = 0;
+ while (index < NEWS_LIMIT) {
+ String resourcePath = NEWS_FILE_PREFIX + index + ".json";
+ String newsString = getNewsFile(resourcePath);
+ if ("".equals(newsString)) {
+ break;
+ }
+ ZSONObject newsJson = ZSONObject.stringToZSON(newsString);
+ String url = newsJson.getString("url");
+ String title = newsJson.getString("title");
+ String image = newsJson.getString("title_image");
+ boolean containsVideo = newsJson.getBooleanValue("contains_video");
+ String video = newsJson.getString("title_video");
+ boolean containsWeb = newsJson.getBooleanValue("contains_webpage");
+ String webPage = newsJson.getString("web_page");
+
+ newsUrlList.add(url);
+ newsTitleList.add(title);
+ newsImageList.add(image);
+ newsInfoMap.put(url, resourcePath);
+ newsContainsVideos.add(containsVideo);
+ newsVideoUrl.add(video != null ? video : "");
+ newsContainsWeb.add(containsWeb);
+ newsWebList.add(webPage);
+ index++;
+ }
+ }
+
+ /**
+ * singleton newsInfo
+ *
+ * @param context context.
+ * @return newsInfo.
+ */
+ public static NewsInfo getInstance(Context context) {
+ if (newsInfo == null) {
+ synchronized (NewsInfo.class) {
+ if (newsInfo == null) {
+ newsInfo = new NewsInfo(context);
+ }
+ }
+ }
+ return newsInfo;
+ }
+
+ /**
+ * to check whether news contains video.
+ *
+ * @param index the news index.
+ * @return whether news contains video.
+ */
+ boolean getNewsContainsVideos(int index) {
+ return newsContainsVideos.get(index);
+ }
+
+ /**
+ * get news video url
+ *
+ * @param index the news index.
+ * @return empty String or video url.
+ */
+ String getNewsVideoUrl(int index) {
+ return newsVideoUrl.get(index);
+ }
+
+ /**
+ * getNewsCount
+ *
+ * @return newsList size
+ */
+ int getNewsCount() {
+ return newsUrlList.size();
+ }
+
+ /**
+ * getNewsTitle
+ *
+ * @param index news index
+ * @return news title
+ */
+ public String getNewsTitle(int index) {
+ return newsTitleList.get(index);
+ }
+
+
+ /**
+ * get specific news url.
+ *
+ * @param index the news index.
+ * @return specific news url.
+ */
+ public String getNewsUrl(int index) {
+ return newsUrlList.get(index);
+ }
+
+ /**
+ * getNewsImage
+ *
+ * @param index news index
+ * @return new image url
+ */
+ public String getNewsImage(int index) {
+ return newsImageList.get(index);
+ }
+
+ /**
+ * getNewsJson
+ *
+ * @param url new url
+ * @return invoke getNewsFile()
+ */
+ String getNewsJson(String url) {
+ String path = newsInfoMap.get(url);
+ return getNewsFile(path);
+ }
+
+ /**
+ * readNewsFile from json, you can extend this part to read newsInfo from different data source.
+ *
+ * @param resourcePath news file location
+ * @return newsJson
+ */
+ private String getNewsFile(String resourcePath) {
+ try {
+ Resource resource = context.getResourceManager().getRawFileEntry(resourcePath).openRawFile();
+ byte[] tmp = new byte[NEWS_CONTENT_SIZE * NEWS_CONTENT_SIZE];
+ int reads = resource.read(tmp);
+ if (reads != EOF) {
+ return new String(tmp, 0, reads, StandardCharsets.UTF_8);
+ }
+ } catch (IOException ex) {
+ HiLog.error(TAG, "GetHttpNews get IO error");
+ }
+ return "";
+ }
+
+ /**
+ * to check whether news contains video.
+ *
+ * @param index the news index.
+ * @return whether news contains video.
+ */
+ boolean getNewsContainsWeb(int index) {
+ return newsContainsWeb.get(index);
+ }
+
+ /**
+ * get Web News url for Web View.
+ *
+ * @param index the news index.
+ * @return News Http url.
+ */
+ public String getWebNewsUrl(int index) {
+ return newsWebList.get(index);
+ }
+}
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/java/com/example/myapplication/newsdata/NewsInfoInternalAbility.java" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/java/com/example/myapplication/newsdata/NewsInfoInternalAbility.java"
new file mode 100644
index 0000000000000000000000000000000000000000..d47a04b2950b89e21783ab8592a87ad6636501dd
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/java/com/example/myapplication/newsdata/NewsInfoInternalAbility.java"
@@ -0,0 +1,105 @@
+package com.example.myapplication.newsdata;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import ohos.ace.ability.AceInternalAbility;
+import ohos.app.AbilityContext;
+import ohos.hiviewdfx.HiLog;
+import ohos.hiviewdfx.HiLogLabel;
+import ohos.rpc.MessageOption;
+import ohos.rpc.MessageParcel;
+import ohos.utils.zson.ZSONArray;
+import ohos.utils.zson.ZSONObject;
+
+/**
+ * NewsInfoInternalAbility mainly duty is to react for FA's news requests.
+ * both phone and TV will get news list and news content from list PA.
+ */
+public class NewsInfoInternalAbility extends AceInternalAbility {
+ private static final HiLogLabel TAG = new HiLogLabel(0, 0, "NewsInfoInternalAbility");
+ private static final int ACTION_REQUEST_NEWS_LIST = 1001;
+ private static final int ACTION_REQUEST_NEWS = 1002;
+ private static NewsInfoInternalAbility INSTANCE;
+ private final AbilityContext context;
+
+ private NewsInfo newsInfo;
+
+ /**
+ * default constructor
+ *
+ * @param context ability context
+ */
+ public NewsInfoInternalAbility(AbilityContext context) {
+ super("com.example.myapplication.newsdata", "NewsInfoInternalAbility");
+ this.context = context;
+ }
+
+ /**
+ * set InternalAbilityHandler for NewsInfoInternalAbility instance
+ *
+ * @param context ability context
+ */
+ public static void register(AbilityContext context) {
+ INSTANCE = new NewsInfoInternalAbility(context);
+ INSTANCE.setInternalAbilityHandler((code, data, reply, option) ->
+ INSTANCE.onRemoteRequest(code, data, reply, option));
+ }
+
+ /**
+ * FA requests news list and news details from this PA with ACTION_CODE, it'll answer for both TV FA and phone FA.
+ * phone/index.js,detail.js tv/index.js will get news content through this method.
+ *
+ * @param code ACTION_CODE
+ * @param data data sent from FA
+ * @param reply reply to send back to FA
+ * @param option currently excessive
+ * @return whether request is correctly responded
+ */
+ private boolean onRemoteRequest(int code, MessageParcel data, MessageParcel reply, MessageOption option) {
+ newsInfo = NewsInfo.getInstance(context);
+ if (code == ACTION_REQUEST_NEWS_LIST) {
+ ZSONArray zsonArray = new ZSONArray();
+ int cnt = newsInfo.getNewsCount();
+ for (int index = 0; index < cnt; index++) {
+ String title = newsInfo.getNewsTitle(index);
+ String url = newsInfo.getNewsUrl(index);
+ String image = newsInfo.getNewsImage(index);
+ boolean containsVideo = newsInfo.getNewsContainsVideos(index);
+ String videoUrl = newsInfo.getNewsVideoUrl(index);
+ boolean containsWeb = newsInfo.getNewsContainsWeb(index);
+ String webPage = newsInfo.getWebNewsUrl(index);
+
+ ZSONObject obj = new ZSONObject();
+ obj.put("url", url);
+ obj.put("title", title);
+ obj.put("title_image", image);
+ obj.put("contains_video", containsVideo);
+ obj.put("video_url", videoUrl);
+ obj.put("contains_webpage", containsWeb);
+ obj.put("web_page", webPage);
+ zsonArray.add(obj);
+ }
+ Map zsonResult = new HashMap<>();
+ zsonResult.put("code", 0);
+ zsonResult.put("list", zsonArray);
+ reply.writeString(ZSONObject.toZSONString(zsonResult));
+ } else if (code == ACTION_REQUEST_NEWS) {
+ String zsonStr = data.readString();
+ ZSONObject zsonObject = ZSONObject.stringToZSON(zsonStr);
+ String content = newsInfo.getNewsJson(zsonObject.getString("url"));
+ String index = zsonObject.getString("index");
+ boolean containsVideo = newsInfo.getNewsContainsVideos(Integer.parseInt(index));
+ String videoUrl = newsInfo.getNewsVideoUrl(Integer.parseInt(index));
+ Map zsonResult = new HashMap<>();
+ zsonResult.put("code", 0);
+ zsonResult.put("contains_video", containsVideo);
+ zsonResult.put("video_url", videoUrl);
+ zsonResult.put("data", content);
+ reply.writeString(ZSONObject.toZSONString(zsonResult));
+ } else {
+ HiLog.info(TAG, "Unsupported code from js");
+ }
+ return true;
+ }
+}
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/java/com/example/myapplication/remotedatabus/RemoteDataReceiverAbility.java" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/java/com/example/myapplication/remotedatabus/RemoteDataReceiverAbility.java"
new file mode 100644
index 0000000000000000000000000000000000000000..9c48f22c6fa2d28bdf03e6b9acecd7fa035e8656
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/java/com/example/myapplication/remotedatabus/RemoteDataReceiverAbility.java"
@@ -0,0 +1,111 @@
+package com.example.myapplication.remotedatabus;
+
+import ohos.aafwk.ability.Ability;
+import ohos.aafwk.content.Intent;
+import ohos.event.notification.NotificationRequest;
+import ohos.hiviewdfx.HiLog;
+import ohos.hiviewdfx.HiLogLabel;
+import ohos.rpc.IRemoteBroker;
+import ohos.rpc.IRemoteObject;
+import ohos.rpc.MessageOption;
+import ohos.rpc.MessageParcel;
+import ohos.rpc.RemoteObject;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * when remote device connect TV, it will connect with NewsServiceAbility instance.
+ * if connection is done, we will return a RemoteMessage object to remote caller as
+ * a proxy to communicate with native PA.
+ * In this template, when a phone transfer news to A TV, the phone will try to start
+ * this ability by calling connectAbility() at phone's DistributeInternalAbility.java.
+ */
+public class RemoteDataReceiverAbility extends Ability {
+ private static final HiLogLabel TAG = new HiLogLabel(0, 0, "RemoteDataReceiverAbility");
+ private static final int NOTIFICATION_ID = 1005;
+ private static final Map HANDLER_MAP = new HashMap<>();
+ private final RemoteHandler remote = new RemoteHandler();
+
+ /**
+ * when devices' FA need to subscribe from PA, it will invoke this method to register message handler.
+ *
+ * @param code device message code.
+ * @param handler message handler.
+ */
+ public static void registerMessageHandler(int code, RemoteMessageHandler handler) {
+ HiLog.info(TAG, "registerMessageHandler code " + code);
+ HANDLER_MAP.put(code, handler);
+ }
+
+ @Override
+ protected void onStart(Intent intent) {
+ super.onStart(intent);
+ // when transfer done create notification,notificationId is 1005.
+ NotificationRequest request = new NotificationRequest(NOTIFICATION_ID);
+ NotificationRequest.NotificationNormalContent content = new NotificationRequest.NotificationNormalContent();
+ content.setTitle("News share").setText("News is connected with remote device");
+ NotificationRequest.NotificationContent notificationContent =
+ new NotificationRequest.NotificationContent(content);
+ request.setContent(notificationContent);
+ keepBackgroundRunning(NOTIFICATION_ID, request);
+ }
+
+ @Override
+ protected IRemoteObject onConnect(Intent intent) {
+ super.onConnect(intent);
+ return remote.asObject();
+ }
+
+ @Override
+ protected void onDisconnect(Intent intent) {
+ super.onDisconnect(intent);
+ }
+
+ @Override
+ protected void onStop() {
+ super.onStop();
+ cancelBackgroundRunning();
+ }
+
+ /**
+ * the handler interface for FA subscribe PA mechanism's messageQueue.
+ */
+ public interface RemoteMessageHandler {
+ void handlerRemote(MessageParcel data, MessageParcel reply);
+ }
+
+ /**
+ * inner class RemoteMessage stands for proxy of remote device, we can communication
+ * with remote device through this proxy
+ */
+ public static class RemoteHandler extends RemoteObject implements IRemoteBroker {
+ private static final int ERROR = -1;
+
+ /**
+ * default constructor
+ */
+ RemoteHandler() {
+ super("MyService_MessageRemote");
+ }
+
+ @Override
+ public IRemoteObject asObject() {
+ return this;
+ }
+
+ @Override
+ public boolean onRemoteRequest(int code, MessageParcel data, MessageParcel reply, MessageOption option) {
+ HiLog.info(TAG, "onRemoteRequest code " + code);
+ if (HANDLER_MAP.get(code) == null) {
+ reply.writeInt(ERROR);
+ return false;
+ }
+
+ RemoteMessageHandler handler = HANDLER_MAP.get(code);
+ handler.handlerRemote(data, reply);
+ return true;
+ }
+ }
+
+}
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/java/com/example/myapplication/remotedatabus/RemoteDataSender.java" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/java/com/example/myapplication/remotedatabus/RemoteDataSender.java"
new file mode 100644
index 0000000000000000000000000000000000000000..4f18cb2a62b084e9f69b14e872990f4809e0000c
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/java/com/example/myapplication/remotedatabus/RemoteDataSender.java"
@@ -0,0 +1,136 @@
+package com.example.myapplication.remotedatabus;
+
+import ohos.aafwk.ability.IAbilityConnection;
+import ohos.aafwk.content.Intent;
+import ohos.aafwk.content.Operation;
+import ohos.app.Context;
+import ohos.bundle.ElementName;
+import ohos.hiviewdfx.HiLog;
+import ohos.hiviewdfx.HiLogLabel;
+import ohos.rpc.IRemoteObject;
+import ohos.rpc.MessageOption;
+import ohos.rpc.MessageParcel;
+import ohos.rpc.RemoteException;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * CommRemoteProxy class for remote Object, all remote communication will go through this proxy instance.
+ */
+public class RemoteDataSender {
+ private static final HiLogLabel TAG = new HiLogLabel(0, 0, "RemoteDataSender");
+ private static final int ERROR = -1;
+ private static final Map REMOTE_CONNECTION_MAP = new HashMap<>();
+
+ /**
+ * This method will be invoke by devices' DistributeInternalAbility when
+ * it want to connect with remote device.
+ *
+ * @param deviceId the deviceID of which device we want to transfer to.
+ * @param context native ability context
+ * @return isSuccess whether connect remote is successful.
+ */
+ public static boolean connectRemote(String deviceId, Context context) {
+ RemoteConnection remote = REMOTE_CONNECTION_MAP.get(deviceId);
+ if (remote != null) {
+ context.disconnectAbility(remote);
+ REMOTE_CONNECTION_MAP.remove(deviceId);
+ }
+
+ RemoteConnection newRemote = new RemoteConnection();
+ Intent intent = new Intent();
+ Operation operation = new Intent.OperationBuilder()
+ .withDeviceId(deviceId)
+ .withBundleName(context.getBundleName())
+ .withAbilityName(RemoteDataReceiverAbility.class.getName())
+ .withFlags(Intent.FLAG_ABILITYSLICE_MULTI_DEVICE)
+ .build();
+
+ intent.setOperation(operation);
+ boolean isSuccess = context.connectAbility(intent, newRemote);
+ HiLog.error(TAG, "connectRemote " + isSuccess);
+ if (isSuccess) {
+ REMOTE_CONNECTION_MAP.put(deviceId, newRemote);
+ }
+ return isSuccess;
+ }
+
+ /**
+ * This method will be invoke by devices' DistributeInternalAbility when
+ * it want to disconnect with remote device.
+ *
+ * @param deviceId the deviceID of which device we want to stop connection.
+ * @param context native ability context
+ */
+ public static void disConnectRemote(String deviceId, Context context) {
+ RemoteConnection remote = REMOTE_CONNECTION_MAP.get(deviceId);
+ if (remote != null) {
+ context.disconnectAbility(remote);
+ REMOTE_CONNECTION_MAP.remove(deviceId);
+ }
+ }
+
+ /**
+ * this method will be invoke by phone DistributeInternalAbility when it wants to
+ * send message to other remote device.
+ *
+ * @param deviceId the deviceID of remote device which we send message to.
+ * @param code device message code.
+ * @param message the action code.
+ * @return result of sending message.
+ */
+ public static int sendMessage(String deviceId, int code, int message) {
+ MessageParcel data = MessageParcel.obtain();
+ MessageParcel reply = MessageParcel.obtain();
+ MessageOption option = new MessageOption(MessageOption.TF_SYNC);
+ data.writeInt(message);
+ RemoteConnection remote = REMOTE_CONNECTION_MAP.get(deviceId);
+ int result = ERROR;
+ if (remote != null) {
+ boolean success = remote.sendMessage(code, data, reply, option);
+ HiLog.info(TAG, "RemoteDataSender: sendMessage " + success);
+ if (success) {
+ result = reply.readInt();
+ }
+ data.reclaim();
+ reply.reclaim();
+ }
+ return result;
+ }
+
+ private static class RemoteConnection implements IAbilityConnection {
+ IRemoteObject myRemoteProxy;
+ boolean isConnected = false;
+
+ RemoteConnection() {
+ }
+
+ @Override
+ public void onAbilityConnectDone(ElementName element, IRemoteObject remote, int resultCode) {
+ // when remote device connect done, it return a serializable object represent remote object
+ // we can control remote object through this proxy
+ myRemoteProxy = remote;
+ isConnected = true;
+ HiLog.info(TAG, "RemoteDataSender: onAbilityConnectDone");
+ }
+
+ @Override
+ public void onAbilityDisconnectDone(ElementName element, int resultCode) {
+ // when remote device PA is closed this callback will be called
+ // developer can handle PA lifecycle according to different returned error message
+ isConnected = false;
+ myRemoteProxy = null;
+ }
+
+ boolean sendMessage(int code, MessageParcel data, MessageParcel reply, MessageOption option) {
+ try {
+ myRemoteProxy.sendRequest(code, data, reply, option);
+ } catch (RemoteException e) {
+ HiLog.error(TAG, "SendCommand error");
+ return false;
+ }
+ return true;
+ }
+ }
+}
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/base/element/string.json" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/base/element/string.json"
new file mode 100644
index 0000000000000000000000000000000000000000..56966b365930b37b47dbbb7b67865d1411ac8ebe
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/base/element/string.json"
@@ -0,0 +1,8 @@
+{
+ "string": [
+ {
+ "name": "commonlib_library",
+ "value": "commonlib_library"
+ }
+ ]
+}
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/base/media/icon.png" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/base/media/icon.png"
new file mode 100644
index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/base/media/icon.png" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news0.json" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news0.json"
new file mode 100644
index 0000000000000000000000000000000000000000..fac48e7d315cac1f578424bf030f3249345a06a6
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news0.json"
@@ -0,0 +1,88 @@
+{
+ "url": "example://consumer.huawei.com/news0",
+ "title": "Huawei Announces Apps Up 2020 Global Winners",
+ "title_image": "/common/newsimages/huawei-hms-app-innovation-contest.jpg",
+ "date": "Dec 02. 2020",
+ "content": [
+ {
+ "type": 2,
+ "image": "/common/newsimages/huawei-hms-app-innovation-contest.jpg"
+ },
+ {
+ "type": 0,
+ "text": "Huawei announces the winners of its global HUAWEI HMS App Innovation Contest. More than 3,000 teams worldwide compete for total prizes of 1 million USD in cash."
+ },
+ {
+ "type": 1,
+ "text": "• More than 100 winners across five contest regions won the highest prizes with each of $15,000 in cash, angel investment and major promotional opportunities\n• Thousands of exciting new apps released on AppGallery during competition process\n• Full list of winners published on the Apps Up 2020 website"
+ },
+ {
+ "type": 0,
+ "text": "More than 3,000 developer teams from five regions across the world participated in Apps Up 2020, HUAWEI HMS App Innovation Contest. The final winners are announced today"
+ },
+ {
+ "type": 0,
+ "text": "The HUAWEI HMS App Innovation Contest for HMS developers was launched in June in Europe, China, Asia Pacific, Latin America and the Middle East & Africa, attracting contestants from over 170 countries. The contest spanned more than 100 days, as contestants found innovative ways to use services of HMS Core."
+ },
+ {
+ "type": 0,
+ "text": "After an extensive public voting phase combined with assessments by our panel of experts, more than 100 entries have been selected for the following categories:"
+ },
+ {
+ "type": 1,
+ "text": "- Best App\n- Best Game\n- Best Social Impact App\n- ost Popular App\n- Honorable Mention"
+ },
+ {
+ "type": 0,
+ "text": "Apps Up 2020 winners enjoy a share of a USD 1 million prize pot, plus potential angel investment and promotional opportunities. Winners will also enjoy promotion of their apps on HUAWEI AppGallery, as well as free access to HUAWEI Mobile Cloud resources and Huawei Developers events, courses and certifications. Apps Up winners also have the opportunity to exchange ideas with the competition judging panel."
+ },
+ {
+ "type": 0,
+ "text": "All contestants already have their apps published on HUAWEI AppGallery, giving them access to a market of millions of HUAWEI device users worldwide."
+ },
+ {
+ "type": 0,
+ "text": "Huawei welcomes submissions from a wide range of fields, including physical and mental health, education, science, agricultural development, environmental protection, transportation, and public safety. Huawei’s aim is to promote apps that create a new smart-living experience for everyone, worldwide."
+ },
+ {
+ "type": 0,
+ "text": "Here are a few examples of the type of creative and inspiring inventions emerged in the Apps Up 2020 Contest:"
+ },
+ {
+ "type": 0,
+ "text": "• Europe: PlantSnap provides a platform for users to share their passion for plants, nature and the environment with like-minded people around the world. Powered by HUAWEI Account Kit and other HMS Core capabilities, it is able to identify plants in seconds\n• China: Earthquake Map & Alert App provides real-time and historical earthquake data sourced from official meteorological websites, helping people around the globe.It integrates HUAWEI Push Kit.\n• Asia Pacific: Spick & Span is an arcade game that encourages players to push for a cleaner world. It integrates In-App Purchases, Account Kit,Push Kit and HUAWEI Ads.\n• Latin America: SOSMex is a panic button app that enables women in Mexico to alert their friends and family of their whereabouts, so they know when they are in danger. The app is built with HUAWEI Awareness Kit, among other HMS Core open capabilities.\n• The Middle East and Africa: The Deaf Sign Language App (ASL) helps users learn sign language by simply saying a word or phrase so they can communicate easily with people that suffer from hearing impairment. It integrates HUAWEI Analytics Kit and HUAWEI Account Kit."
+ },
+ {
+ "type": 0,
+ "text": "Zhang Ping'an, President of Huawei Consumer Cloud Service says: “We remain committed to providing developers with more capabilities, IDE and tools, aspiring to help them make their innovative ideas into reality and bring their creations to the world. Huawei welcomes all developers to join us in the HMS ecosystem and looks forward to joining hands with them to shape the future of technology.”"
+ },
+ {
+ "type": 0,
+ "text": "#HMSInnovateforAll"
+ },
+ {
+ "type": 1,
+ "text": "About Huawei Developers"
+ },
+ {
+ "type": 0,
+ "text": "Huawei Developers, a platform as part of Huawei Mobile Services, provides a one-stop operation support to developers throughout the entire cycle of app and service development; helping developers to turn ideas into reality with the full suite of development capabilities available through HMS Core."
+ },
+ {
+ "type": 0,
+ "text": "With more than 2 million developers worldwide already, the ambition of Huawei Developers is to connect with global developers to build an open and innovative ecosystem with shared success."
+ },
+ {
+ "type": 0,
+ "text": "Apps created on Huawei Developers can be published and distributed on HUAWEI AppGallery, Huawei’s app distribution platform and one of the world's first app stores implementing a developer identity verification system. It also features a four-layer detection system to ensure app security and leverages proprietary algorithms to enable useful content recommendations."
+ },
+ {
+ "type": 1,
+ "text": "About HMS Core"
+ },
+ {
+ "type": 0,
+ "text": "HMS Core is a collection of tools made for Huawei’s partners and app developers to create unique, new experiences that tap into the full hardware and software capabilities of Huawei devices have on offer. By integrating HMS Core 5.0, developers can quickly leverage Huawei’s on-device capabilities. HMS Core are currently supporting more than 2 million developers, and 55,000 apps worldwide."
+ }
+ ]
+}
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news1.json" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news1.json"
new file mode 100644
index 0000000000000000000000000000000000000000..28d2835ac2c7a5574881da0f3970cdc0de527103
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news1.json"
@@ -0,0 +1,8 @@
+{
+ "url": "example://consumer.huawei.com/news1",
+ "title": "HUAWEI Mate40 Series",
+ "title_image": "/common/newsimages/mate40-series-web.jpg",
+ "date": "Oct 22. 2020",
+ "contains_video": true,
+ "title_video": "/common/newsvideo/mate40-pv.mp4"
+}
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news2.json" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news2.json"
new file mode 100644
index 0000000000000000000000000000000000000000..23656c52f2348210734b66bcd063ed16b78bac52
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news2.json"
@@ -0,0 +1,100 @@
+{
+ "url": "example://consumer.huawei.com/news2",
+ "title": "Leap Further Ahead with HUAWEI Mate 40 Series: Huawei Unveils the Most Powerful Mate Line-up Ever",
+ "title_image": "/common/newsimages/leap-further-ahead-with-huawei-mate-40.jpg",
+ "date": "Oct 22. 2020",
+ "content": [
+ {
+ "type": 0,
+ "text": "Huawei Consumer Business Group (BG) today bolstered its product line-up with the advanced HUAWEI Mate 40 Series, the latest revolutionary flagship smartphones that empower users to leap further ahead. Showcasing the pinnacle of Huawei technology, the new Series reinforces Huawei’s dedication to innovation and its unrelenting determination to create the best Mate ever."
+ },
+ {
+ "type": 2,
+ "image": "/common/newsimages/leap-further-ahead-with-huawei-mate-40.jpg"
+ },
+ {
+ "type": 0,
+ "text": "The HUAWEI Mate 40 Series has the Mate Series DNA at its core. Over the last eight years, there have been 10 outstanding generations of Mate Series devices and now the latest flagship smartphones take Mate to new heights with the best technology in the industry. From powerful performance to unique user interactions, everything about the HUAWEI Mate 40 Series has been fine-tuned to provide the most exciting smartphone experience possible. HUAWEI Mate 40 Pro and HUAWEI Mate 40 Pro+ incorporate the world’s first 5 nanometer 5G SoC, Ultra Vision Cine Camera system and the iconic Space Ring Design, as well as a smarter, more attentive digital experience."
+ },
+ {
+ "type": 0,
+ "text": "Richard Yu, Executive Director and CEO of Huawei Consumer BG said: “Each year the HUAWEI Mate Series brings the most exciting technology together into one stunning package. This is what defines the Mate Series DNA and is all made possible by our dedication to innovation. In these unprecedented times, we remain committed to creating a better future, with innovative technology that delivers a positive and meaningful impact on the lives of consumers. In the future, we will continue working closely with our partners to bring the Seamless AI Life experience to consumers all around the world."
+ },
+ {
+ "type": 1,
+ "text": "Leap further ahead with the iconic Space Ring Design"
+ },
+ {
+ "type": 0,
+ "text": "Marrying iconic design with innovative technology, HUAWEI Mate 40 Pro and HUAWEI Mate 40 Pro+ are informed by the design principle that form manifests function. The uncompromised design of the HUAWEI 88° Horizon Display creates an immersive viewing experience in a compact package, while the silky curve also means the devices are comfortable to hold. The handsets also offer IP 68 dust and water resistance, a choice of both virtual and physical volume controls and enhanced mistouch prevention algorithms."
+ },
+ {
+ "type": 0,
+ "text": "Objects of sheer beauty, the HUAWEI Mate 40 Pro and HUAWEI Mate 40 Pro+ devices carry a small front camera cut-out, which is packed full of technology, with 3D Face Unlock, an Ultra Vision Selfie Camera and Smart Gesture Control."
+ },
+ {
+ "type": 0,
+ "text": "Turn the devices over and you will see that the HUAWEI Mate 40 Series adopts the Space Ring Design, an evolution of the HUAWEI Mate Series’ iconic circular and symmetrical design. HUAWEI Mate 40 and HUAWEI Mate 40 Pro are available in Black and White, as well as an enchanting Mystic Silver, a finish with a colour-shifting effect that evokes the mysteries of the unseen. There are also two vegan leather variants, Yellow and Green. Meanwhile, HUAWEI Mate 40 Pro+ features an exquisite nano-tech ceramic back panel available in two iconic colours: Ceramic White and Ceramic Black."
+ },
+ {
+ "type": 1,
+ "text": "Leap further ahead with Kirin 9000 setting a new standard for performance"
+ },
+ {
+ "type": 0,
+ "text": "Powering the best Mate ever, the Kirin 9000 Series is fully equipped for 5G, capable of handling intensive computations and multi-tasking operations with ease. Embedded in HUAWEI Mate 40 Pro and HUAWEI Mate 40 Pro+, the Kirin 9000 is the most sophisticated 5nm 5G SoC available, delivering vastly improved performance and power efficiency over its predecessor. For the first time ever, the flagship 5G SoC has more than 15.3 billion transistors, making it the densest and most full-featured 5G SoC to date. The powerful CPU features a three-level power efficiency architecture with cores running at clock frequencies of up to 3.13GHz. Also integrated into the SoC is a 24-core Mali-G78 GPU, as well as an innovative NPU featuring two big cores and one tiny core, taking on-device AI to a new level."
+ },
+ {
+ "type": 0,
+ "text": "The 24-core Mali-G78 GPU in HUAWEI Mate 40 Pro and HUAWEI Mate 40 Pro+ is the most powerful GPU ever seen on a Huawei device. This delivers advanced graphics performance and is complemented by an amazing audio visual experience for immersive gaming. The 90Hz display works together with 240Hz touch sampling rate for greater responsiveness and now provides haptic feedback to correspond with the visual experience. This entertainment set-up is completed with dual stereo speakers to create experiences with super bass stereo."
+ },
+ {
+ "type": 0,
+ "text": "The HUAWEI Mate 40 Series is also equipped with the battery technology that is needed to keep up with the demands of 5G, supporting the fastest iteration of HUAWEI SuperCharge."
+ },
+ {
+ "type": 1,
+ "text": "Leap further ahead with an all-round imaging system engineered to make photography simple"
+ },
+ {
+ "type": 0,
+ "text": "The camera system on the HUAWEI Mate 40 Series has been co-engineered with Leica to provide the best camera solution possible and sees breakthrough upgrades to the ultra-wide angle lens, powerful high-definition main camera, impressive telephoto camera and more. With the Dual Cine Cameras and Dual Ultra Wide Cameras on HUAWEI Mate 40 Pro and HUAWEI Mate 40 Pro+, users can capture amazing wide angle videos and images from both the front-and rear-facing cameras."
+ },
+ {
+ "type": 0,
+ "text": "When it comes to cinematic videography, the HUAWEI Mate 40 Pro and HUAWEI Mate 40 Pro+ are unparalleled. The Dual Cine Cameras feature a 3:2 cinema-style shooting ratio sensor. Capturing high quality footage is easier than ever with Steady Shot, while the XD Fusion HDR Video ensures balanced exposure, even when users are capturing with extreme lighting contrast. Other evolutions include Tracking Shot, while Story Creator allows for true cinematic effects. Background music, filters and effects can also be added with ease. Not neglecting audio, HUAWEI Mate 40 Series features Audio Focus, Audio Zoom, and dual stereo speakers."
+ },
+ {
+ "type": 0,
+ "text": "The Ultra Wide Cine Camera now offers an even wider field of view, as well as richer detail, improved low light performance and distortion correction algorithms, allowing users to capture beautiful expansive landscapes, while the Super Sensing Wide Camera provides true high definition shots. Image quality has been further enhanced with Full Pixel Octa PD AutoFocus. Improved distortion correction targets the face, body and limbs, making the ultra-wide angle lens useful in more scenarios than ever. HUAWEI Mate 40 Pro features a Periscope Telephoto Camera to support 10x hybrid zoom and 50x digital zoom, and HUAWEI Mate 40 Pro+ takes it further with a dual-telephoto camera system that enables 20x hybrid zoom and 100x digital zoom."
+ },
+ {
+ "type": 0,
+ "text": "The Ultra Vision Selfie Camera on the HUAWEI Mate 40 Series take selfies and videos to new heights with support for 4K capture and the option to shoot in one of three available fields of view, ranging from up close and personal to ultra-wide. Slow-Motion Selfie adds even more versatility to the front camera by letting users add dramatic flair when documenting their fast-paced actions."
+ },
+ {
+ "type": 1,
+ "text": "Leap further ahead with an all new user experience"
+ },
+ {
+ "type": 0,
+ "text": "HUAWEI Mate 40 Pro and HUAWEI Mate 40 Pro+ are set to revolutionise how consumers integrate smartphones into their lives with new user-centric features including Smart Gesture Control, which allows total hands-free control of your device. Simply hover your hand over the device to wake it up or navigate your phone by swiping left, right, up and down. There is also an air press gesture for call answering."
+ },
+ {
+ "type": 0,
+ "text": "A device that is always there for you, the all new dynamic Eyes on Display on HUAWEI Mate 40 Pro and HUAWEI Mate 40 Pro+ can be activated at a glance, with fully customisable interactive displays hosting all the information you need from your phone. The ring of incoming calls can be reduced by making eye contact with your phone."
+ },
+ {
+ "type": 0,
+ "text": "Improved MeeTime functionality is a gateway to a better connected, more intelligent life.When combined with the power of Huawei’s 1+8+N ecosystem, Multi-screen Collaboration offers an intuitive way for users to operate multiple devices at once, running several apps simultaneously, combining smartphone and PC to deliver unique experiences."
+ },
+ {
+ "type": 0,
+ "text": "When it comes to privacy and security, the EMUI 11 operating system has always featured comprehensive security solutions to protect Huawei device users. The Trusted Execution Environment operating system is CC EAL5+ certified, which is the highest certification level for commercialised security microkernel. EMUI 11 also comes with new privacy features. When transferring images, users can easily purge sensitive personal data such as location, time and device details from the file before it is sent."
+ },
+ {
+ "type": 0,
+ "text": "HUAWEI Mate 40 Series comes equipped with the innovative Huawei Mobile Services (HMS), bringing users a smarter, richer, more convenient and secure smartphone experience. During the launch, Huawei also unveiled new apps available for global Huawei users, including Petal Search, a search engine with support for multiple types of searches; Petal Maps, a map app that utilises the HUAWEI Mate 40 Series’ gesture control feature; and HUAWEI Docs, a unified word document service. These apps come together to lead the way towards a better digital life for the 700 million Huawei device users worldwide."
+ }
+ ]
+}
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news3.json" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news3.json"
new file mode 100644
index 0000000000000000000000000000000000000000..b817581aadcf394bc87011950c2346357a58124e
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news3.json"
@@ -0,0 +1,68 @@
+{
+ "url": "example://consumer.huawei.com/news3",
+ "title": "Huawei Launches Petal Search, Petal Maps, HUAWEI Docs and More",
+ "title_image": "/common/newsimages/huawei-launches-petal-search-petal-map-1.jpg",
+ "date": "Oct 22. 2020",
+ "content": [
+ {
+ "type": 0,
+ "text": "Huawei today announced new developments to Huawei Mobile Services ecosystem at the HUAWEI Mate 40 Series launch event, launching Petal Search, Petal Maps, HUAWEI Docs, levelling up global Huawei users' digital experience with other new updates."
+ },
+ {
+ "type": 1,
+ "text": "Hardware and software integration enhances digital lifestyle experience"
+ },
+ {
+ "type": 0,
+ "text": "Huawei’s official search engine app, Petal Search now is available in over 170 countries and regions and supports over 50 languages, letting users conveniently and instantly find out the information and services they need."
+ },
+ {
+ "type": 2,
+ "image": "/common/newsimages/huawei-launches-petal-search-petal-map-1.jpg"
+ },
+ {
+ "type": 0,
+ "text": "Petal Search offers search capabilities across more than 20 categories, including apps, news, videos, images, shopping, flights, and local business. It also develops and integrates various tools, such as weather, calculator, rate exchange and even paper query to help user easily obtain daily-used information. With the new update, the search experience is now visually richer. Search results are presented in information cards, as opposed to simple weblinks, to help users get this wealth of useful information instantly with just a few clicks."
+ },
+ {
+ "type": 0,
+ "text": "Leveraging Huawei devices’ AI capabilities, Petal Search allows users to search by taking photos or images through its visual search function. It recognises a wide range of objects such as people, animals, and landmarks, and will introduce new capabilities such as plants identification. For instance, user can simply take a photo of a dish and Petal Search will provide the recipe. A voice search feature is also integrated in the app, supporting English, Spanish, French, Arabic and more. These features help Petal Search meet the needs of users accustomed to an efficient and mobile-centric lifestyle."
+ },
+ {
+ "type": 0,
+ "text": "In addition, with the cooperation with global and local partners, Petal Search is vigorously developing local life search services, to provide users a rich location-based and scenario-based search experience. When user look up for local life content, Petal Search provides users with high-quality and popular localized information, such as personalized recommendations or nearby foods, worth visiting local attractions, and shopping discounts."
+ },
+ {
+ "type": 0,
+ "text": "Petal Maps, meanwhile, is Huawei’s quality and convenient mapping and navigational tool, offering positioning services, immersive map displays, place searches, driving navigation and favorite place lists to users in over 140 countries and regions. Petal Maps supports map displays in multiple languages, with voice notifications in English, French, Spanish, German, Italian, and Mandarin."
+ },
+ {
+ "type": 0,
+ "text": "Petal Maps is also equipped with cutting-edge functions to give a real-time publish transit updates in some major cities, helping commuters better plan their routes and take the worry off travelling. Utilizing pioneering technologies such as Super GNSS and image recognition algorithms, Petal Maps further heighten the accuracy and present users the most efficient and least congested routes."
+ },
+ {
+ "type": 0,
+ "text": "Thanks to HUAWEI Mate 40 Series devices’ Gesture Control, drivers are able to switch between the navigation view and map overview by simply using “air press” towards the screen with their palms. These smart interactions significantly enhance the ease of travel, as well as facilitate a safe driving experience."
+ },
+ {
+ "type": 0,
+ "text": "HUAWEI Docs, available in more than 100 countries and regions, supports document viewing and editing across over 50 formats including PDF, PPT, and DOC. With real-time syncing enabled by cloud capabilities, HUAWEI Docs lets users seamlessly work on the same document on different devices logged into the same HUAWEI ID, enhancing the smart office experience."
+ },
+ {
+ "type": 1,
+ "text": "Full suite of Huawei Mobile Services apps to complement digital living"
+ },
+ {
+ "type": 0,
+ "text": "Upgrade on Find Device enables users to locate their Huawei devices such as smartphones, watches, earphones, and glasses. Users can either play a ringtone remotely to help locate the devices, or choose to lock and wipe devices information, protecting user privacy."
+ },
+ {
+ "type": 0,
+ "text": "HUAWEI Themes introduced exclusive theme packs to enable deeper device personalisation. The first batch of packs includes themes of famous artists, classic literature, and the Ingenuity series Huawei selected. "
+ },
+ {
+ "type": 0,
+ "text": "Supported by 2 million global developers, Huawei Mobile Services ecosystem maintains rapid growth. As one of the top 3 app marketplace globally, AppGallery continues to bring together popular global and local apps to over 500 million monthly active users. HUAWEI Quick App also reach a 260% year-on-year increase of monthly active users for its tap-to-use and installation-free experience."
+ }
+ ]
+}
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news4.json" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news4.json"
new file mode 100644
index 0000000000000000000000000000000000000000..266ef89dc1df3e69e7b2b9e4fe9a20a911ac55f1
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news4.json"
@@ -0,0 +1,8 @@
+{
+ "url": "example://consumer.huawei.com/news4",
+ "title": "HUAWEI WATCH GT 2 Pro",
+ "title_image": "/common/newsimages/watch-gt2-pro.jpg",
+ "date": "Oct 22. 2020",
+ "contains_video": true,
+ "title_video": "/common/newsvideo/huawei-watch-gt2-pro-video.mp4"
+}
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news5.json" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news5.json"
new file mode 100644
index 0000000000000000000000000000000000000000..671f2825f37c066dc652c7070ddf68b8cd407589
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news5.json"
@@ -0,0 +1,56 @@
+{
+ "url": "example://consumer.huawei.com/news5",
+ "title": "Porsche Design and Huawei Unveil PORSCHE DESIGN HUAWEI WATCH GT 2",
+ "title_image": "/common/newsimages/huawei-unveil-porsche-design-huawei-watch-gt-2.jpg",
+ "date": "Oct 22. 2020",
+ "content": [
+ {
+ "type": 0,
+ "text": "Design and Huawei today released the new PORSCHE DESIGN HUAWEI WATCH GT 2 at the HUAWEI Mate 40 Series launch event. Huawei’s lat-est smartwatch is a classic yet luxurious addition to the HUAWEI WATCH GT 2 family and marks the brand’s latest collaboration with Porsche Design in the smartwatch industry. As the most high-end addition to the lineup, the PORSCHE DESIGN HUAWEI WATCH GT 2 is a stunning combination of Huawei’s innovative technology and Porsche Design’s pure and functional design philosophy, result-ing in a brand new look that ushers in the next era of smartwatch design."
+ },
+ {
+ "type": 2,
+ "image": "/common/newsimages/huawei-unveil-porsche-design-huawei-watch-gt-2.jpg"
+ },
+ {
+ "type": 1,
+ "text": "Classic sports car-inspired design and materials"
+ },
+ {
+ "type": 0,
+ "text": "The PORSCHE DESIGN HUAWEI WATCH GT 2 features a streamlined titanium body that pays homage to high-speed supercar design. The bezel, with the iconic Porsche Design logo integrated at the top, is seamlessly incorporated into the watch face giving it a premium touch. The smartwatch comes with the innovative quick fit titanium link strap, which users can easily disassemble or adjust, and is made from titanium and polished with a rigorous sandblasting process for a perfect matte finish. Huawei’s new titanium buckle is accented with the Porsche Design Icon, and makes the process of putting on and taking off the watch quick and easy. The end result is a flawlessly designed smartwatch that is premium, mature and scratch-resistant, ideal for everyday wear and outdoor activities."
+ },
+ {
+ "type": 0,
+ "text": "Two digital crowns feature Porsche Design’s iconic red circle and are a testament to the innovative and high-end manufacturing of the watch. With a gentle press, users can easily explore the various settings and configurations."
+ },
+ {
+ "type": 0,
+ "text": "The customised Porsche Design watch faces are beautifully crafted and provide a sharp yet smart aesthetic. The classic and always-on watch face allows time to pass by elegantly on the wrist. Both the watch hands and numbers are easy to read at a glance. Less is more with the E-PURE watch face which takes the iconic analogue dial to the digital era. Motorsport-inspired racing lines displayed on the back of the PORSCHE DESIGN HUAWEI Mate 40 RS are transferred from the Smartphone to the racing watch face, paying homage to the brand’s sports car DNA and racing history. The smartwatch also offers an innovative stopwatch face that allows users to start timing with a tap of the screen."
+ },
+ {
+ "type": 1,
+ "text": "Smart workout modes and health monitoring"
+ },
+ {
+ "type": 0,
+ "text": "The PORSCHE DESIGN HUAWEI WATCH GT 2 is built with excellence from the outside in. The new smartwatch provides an impressive two-week long battery life, offering a reliable digital health and fitness manager for users. "
+ },
+ {
+ "type": 0,
+ "text": "The smartwatch supports data tracking for more than 100 workout modes, including indoor and outdoor sports such as golf driving range, skiing and mountain climbing amongst others. Combining exclusive and pure design, great durability and 50 metre water-resistance1 , the PORSCHE DESIGN HUAWEI WATCH GT 2 is an ideal companion for all occasions. "
+ },
+ {
+ "type": 0,
+ "text": "Advanced heart rate tracking is available via upgraded HUAWEI TruSeen™ 4.0+ heart rate monitoring technology and a 6-in-1 LED lens, which is installed on the delicate ceramic back of the watch. The lens is made of sapphire for better light penetration and accurate heart rate tracking, while the ceramic rear case feels comfortable on the skin. The PORSCHE DESIGN HUAWEI WATCH GT 2 offers comprehensive health monitoring around the clock and measures everything from heart rate, stress level, sleep quality and SpO2 level. In addition, the smartwatch supports all day continuous monitoring of SpO2 level2 , caring for users’ health day and night."
+ },
+ {
+ "type": 1,
+ "text": "About Porsche Design:"
+ },
+ {
+ "type": 0,
+ "text": "In 1963, Professor Ferdinand Alexander Porsche created one of the most iconic design objects in contemporary history: the Porsche 911. Following his vision to take the principles and myth of Porsche beyond the automotive world, he created the exclusive lifestyle brand Porsche Design in 1972. His philosophy and design language can still be seen in all Porsche Design products today. Every Porsche Design product stands for extraordinary precision and perfection, boasts a high level of technological innovation and seamlessly combines intelligent functionality and puristic de-sign. Created by Studio F. A. Porsche in Austria, our products are sold worldwide in over 130 Porsche Design stores, high-end department stores, exclusive specialist retailers and the official online store(www.porsche-design.com)."
+ }
+ ]
+}
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news6.json" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news6.json"
new file mode 100644
index 0000000000000000000000000000000000000000..7bfc6e638224c7dd2206462b2a0995a3f7954129
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news6.json"
@@ -0,0 +1,72 @@
+{
+ "url": "example://consumer.huawei.com/news6",
+ "title": "Huawei Introduces FreeBuds Studio Featuring Dynamic ANC and Hi-Fi Sound",
+ "title_image": "/common/newsimages/huawei-launches-freebuds-studio.jpg",
+ "date": "Oct 22. 2020",
+ "content": [
+ {
+ "type": 0,
+ "text": "Huawei Consumer Business Group (BG) today announced the company’s first over-ear wireless headphones, HUAWEI FreeBuds Studio. The new headphones offer a Hi-Fi-level listening experience and up to 48 kHz wide frequency high-resolution sound quality to truly restore the rich details of high-resolution music. The industry-leading intelligent dynamic active noise cancellation (ANC) provides three noise cancellation modes that can be switched according to varying environmental noise. With the dual connection, users can say goodbye to the complicated pairing process and enjoy the seamless connection provided by HUAWEI FreeBuds Studio."
+ },
+ {
+ "type": 0,
+ "text": "Inspired by geometrics and simplicity, HUAWEI FreeBuds Studio offers a stylish look and comfortable fit. It is not only a headphone, but also a smart assistant that allows consumers to experience a better digital audio world."
+ },
+ {
+ "type": 1,
+ "text": "Rethink aesthetics with geometric shapes"
+ },
+ {
+ "type": 0,
+ "text": "HUAWEI FreeBuds Studio combines art with technology to deliver a beautifully designed and comfortable pair of headphones suitable for many different styles. Instead of using complicated shapes, the ear cups are designed with simple lines and circles, finished with a metallic matte texture for a premium look. A stainless steel cylindrical arm connects the headband and ear cups to provide a unique design."
+ },
+ {
+ "type": 0,
+ "text": "Further improving the wearing experience, HUAWEI FreeBuds Studio provides larger ear cups that measure 65 mm x 42 mm to create a spacious fit for more ear sizes. The protein leather ear pad not only feels soft and comfortable, but also enables great sound insulation effects. Its headband uses a streamlined design and can extend to 150 degrees to fit different head shapes and sizes."
+ },
+ {
+ "type": 1,
+ "text": "Rethink the listening experience with high resolution sound quality"
+ },
+ {
+ "type": 0,
+ "text": "Thanks to professional acoustic components, HUAWEI FreeBuds Pro supports an ultra-wide frequency response of 4Hz - 48 kHz, fine-tuned by audio experts to deliver great sounding music with rich details."
+ },
+ {
+ "type": 0,
+ "text": "HUAWEI FreeBuds Studio features a customised diaphragm driver. A four-layer 40mm polymer diaphragm enables a wider frequency response range and higher sensitivity, while Huawei's self-developed L2HC wireless audio codec technologies achieve an audio transmission rate of up to 960 kbps This allows HUAWEI FreeBuds Studio to truly reproduce the original high-quality sounds of audio files in glorious detail."
+ },
+ {
+ "type": 1,
+ "text": "Intelligent dynamic noise cancellation for a whole new ANC experience"
+ },
+ {
+ "type": 0,
+ "text": "HUAWEI FreeBuds Studio features the innovative \"TAT\" double-layer sound insulation structure and intelligent dynamic ANC that achieve noise cancellation effect of up to 40 dB. With the built-in IMU environment sensor and microphone system, the headphones can accurately detect the user’s sound environment and offer three ANC modes that can adapt to the environment for better noise cancellation effects."
+ },
+ {
+ "type": 0,
+ "text": "In addition, HUAWEI FreeBuds Studio supports awareness mode and voice mode, allowing users to stay aware of their surroundings or have a clear conversations without removing their headphones. Moreover, the all-new six-mic call noise reduction system can pick up voice more directionally, effectively focusing on voices and cutting out background noise."
+ },
+ {
+ "type": 1,
+ "text": "Seamless all-scenario connections to revamp the audio connection experience"
+ },
+ {
+ "type": 0,
+ "text": "Users are beginning to expect dual-device connections in the smart life era. HUAWEI FreeBuds Studio features four-channel, dual-mode and dual connection, which allows users to simultaneously connect with two devices without needing to disconnect and re-connect. It not only supports dual connection with Huawei all-scenario devices, but also with Android, iOS and Windows-based devices to enable seamless connection between devices."
+ },
+ {
+ "type": 0,
+ "text": "HUAWEI FreeBuds Studio is the industry’s first dual antenna over-ear wireless headphone that offers 360° omnidirectional Bluetooth signal coverage for a more stable connection. Even in places with strong signal interference such as airports, the dual antenna design can intelligently identify and automatically switch to another antenna with a stronger signal, bringing better connection and stability for smooth phone calls."
+ },
+ {
+ "type": 0,
+ "text": "When the HUAWEI FreeBuds Studio is fully charged, it can play music with ANC for up to 20 hours, or 24 hours if the ANC is turned off. With just a 10-minute quick charge, the HUAWEI FreeBuds Studio can offer five hours of music playback with ANC on, or eight hours if the ANC is turned off."
+ },
+ {
+ "type": 0,
+ "text": "The new HUAWEI FreeBuds Studio meets users’ increasingly demanding audio needs. Its Hi-Fi level of wireless audio quality performance, ground-breaking noise cancellation experience and interactive features enhance both work and entertainment, providing all-day wearing comfort."
+ }
+ ]
+}
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news7.json" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news7.json"
new file mode 100644
index 0000000000000000000000000000000000000000..cd582a473a7f67ed80b0f12dc81285ddda29b09a
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news7.json"
@@ -0,0 +1,52 @@
+{
+ "url": "example://consumer.huawei.com/news7",
+ "title": "Huawei Announces HUAWEI X GENTLE MONSTER Eyewear II: Leading the Way in Smart Audio Fashion",
+ "title_image": "common/newsimages/huawei-launches-gentle-monster-eyewear.jpg",
+ "date": "Oct 22. 2020",
+ "content": [
+ {
+ "type": 0,
+ "text": "Today, Huawei officially unveiled the next generation of smart glasses in the HUAWEI X GENTLE MONSTER Eyewear II. Based on their core design philosophy of the seamless fusion of technology with fashion, Huawei’s second-generation smart glasses continue to focus on audio and smart innovation, with a more avant-garde yet comfortable design and a greater wealth of outstanding smart functions to experience. With it, Huawei is forging a unique and iconic smart wear trend for sophisticated fashion-conscious consumers. "
+ },
+ {
+ "type": 2,
+ "image": "common/newsimages/huawei-launches-gentle-monster-eyewear.jpg"
+ },
+ {
+ "type": 0,
+ "text": "The Eyewear II collection is a bold and forward-thinking variation on GENTLE MONSTER’s designs. The Eyewear II draws on GENTLE MONSTER’s design philosophy which is not only visually stunning but also offers a wide range of sunglasses and eyewear options to accentuate the wearer’s personality. Eyewear II was designed using Huawei’s core technologies and acoustic privacy protection features. The semi-open, ultra-thin, large-amplitude speaker effectively cancels out sound leakage and provides the wearer with high-definition stereo sound. The newly upgraded Smart Interaction function turns the glasses into your own personal assistant, which offers not only faster access to information, but also a more intelligent form of interaction, providing consumers with a brand new experience of smart wearable technology. "
+ },
+ {
+ "type": 1,
+ "text": "Fashion and comfort in style"
+ },
+ {
+ "type": 0,
+ "text": "The HUAWEI X GENTLE MONSTER Eyewear II offers a more comfortable wearing experience. Integrating technologies in a precise manner, the slim temples are made of plastic titanium for lower density and lighter weight. The hinge between the temples and the frame rim is also made of titanium elastic, with increased holding strength to reduce the gripping feeling brought about on the temples. Furthermore, the curved earpiece angle has been increased from the first generation, from 12° to 20°, to achieve a better fit."
+ },
+ {
+ "type": 0,
+ "text": "Compared to the first generation, Eyewear II features a larger, slimmer, large-amplitude loudspeaker that offers a wider soundstage range for a more immersive sound experience, perfect for listening to music, playing games or watching TV."
+ },
+ {
+ "type": 0,
+ "text": "Eyewear II also features a unique acoustic privacy design, with one semi-open speaker on each side of the lens temple, which transmits sound directly to the wearer's ear through the directional sound chamber, effectively reducing sound leakage and providing a clearer and more layered stereo experience. Meanwhile, both temples include a leakage hole design that can offset the directional sound waves generated by sound cavities, further reducing sound leakage. Together with adaptive volume technology, Eyewear II can automatically lower the volume based on the ambient sound environment, which ensures the user can hear clearly while minimising the impact on the people around them."
+ },
+ {
+ "type": 1,
+ "text": "Smart audio, smart interaction"
+ },
+ {
+ "type": 0,
+ "text": "Eyewear II supports updated smart gesture control. For pairing, users only need to gently pinch on the left temple. In addition, the voice assistant can be easily activated by a double tap on the left temple. Eyewear II also supports swiping gestures. To play the next/previous song or adjust the volume, users only need to make a few swipes on the temples without taking out their phone. Equipped with multiple advanced sensors, Eyewear II can intelligently detect wear status. For instance, during music playback, Eyewear II will pause when the sensors detect that the user has taken off the glasses, and will resume if the user puts them on again within three minutes."
+ },
+ {
+ "type": 0,
+ "text": "In addition, Eyewear II makes a step forward interms of smart experience. After the user puts aside their Eyewear II for a while and put them on again, a window will pop up on the smartphone screen, so the user can check Eyewear II’s battery level with a glance. By tapping on the pop-up window, the user can quickly go to the device’s settings for more details3. Eyewear II plays a greeting when the user puts them on for the first time each day. "
+ },
+ {
+ "type": 0,
+ "text": "Aside from outstanding audio experience, Eyewear II comes with powerful battery to allow users to keep wearing them for hours on end. Eyewear II can play music for 5 hours continuously on a single charge. Moreover, Eyewear II features new NFC contactless and wireless fast charging technology, making the glasses ready to use anytime, anywhere."
+ }
+ ]
+}
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news8.json" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news8.json"
new file mode 100644
index 0000000000000000000000000000000000000000..e411af73764099ae538cc6ae88fd7326441b984e
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news8.json"
@@ -0,0 +1,29 @@
+{
+ "url": "example://consumer.huawei.com/news8",
+ "title": "HUAWEI Women Developers Program Drives Technological Innovation",
+ "title_image": "/common/newsimages/woman-dev.jpg",
+ "contains_webpage": true,
+ "web_page": "https://consumer.huawei.com/en/press/news/2021/huawei-women-developers-program-drives-technological-innovation/",
+ "content": [
+ {
+ "type": 0,
+ "text": "Huawei today officially launched its HUAWEI Women Developers (HWD) program, which aims to empower women developers to create applications and tools that can change the world. The program is intended to encourage more women to join in technological innovation by providing participants with more opportunities and platforms for career development and skill training. Any woman developer from around the world can register to join the program on the HUAWEI Developers official website."
+ },
+ {
+ "type": 2,
+ "image": "common/newsimages/huawei-woman.jpg"
+ },
+ {
+ "type": 0,
+ "text": "Huawei states in the announcement that, in the digital era, more opportunities and support must be given to women to ensure they have access to the education and training that they need to be fundamentally competitive in the digital economy. Equipping women with these skills has proven to promote social integration and inclusive and diversified societies."
+ },
+ {
+ "type": 2,
+ "image": "common/newsimages/woman-dev.jpg"
+ },
+ {
+ "type": 0,
+ "text": "The HUAWEI Women Developers program is the newest initiative that Huawei has taken as part of its commitment to promoting gender equality. The program will provide participants with training on technological innovation and career development paths, along with opportunities to meet with experts in cutting-edge technologies from various fields, and to participate in hands-on scenario-based experiments and drills. Huawei hopes to create a special community for women developers on the HUAWEI Developers platform, and organize a series of online and offline events."
+ }
+ ]
+}
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news9.json" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news9.json"
new file mode 100644
index 0000000000000000000000000000000000000000..b912c6e1964d4957f3b1bca157c85cda835c3229
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/commonlib/src/main/resources/rawfile/news9.json"
@@ -0,0 +1,33 @@
+{
+ "url": "example://consumer.huawei.com/news9",
+ "title": "Huawei Debuts Smart Home Project at MWC Shanghai 2021",
+ "title_image": "/common/newsimages/smart-home.jpg",
+ "contains_webpage": true,
+ "web_page": "https://consumer.huawei.com/en/press/news/2021/huawei-debuts-smart-home-project-at-mwc-shanghai-2021/",
+ "content": [
+ {
+ "type": 0,
+ "text": "Today, Huawei's first Smart Home project was unveiled at MWC Shanghai 2021. Following the core design concept of building a smart home, the installation includes a living room, kitchen, study, home gym, entertainment room, and garage, and covers an area of 550 m2 in total. Using wireless technologies, Huawei's products, including phones, PCs, tablets, watches, smart speakers, and the Vision TV range, are integrated with products from Huawei ecosystem partners to provide a comfortable, intelligent and immersive Smart Home experience."
+ },
+ {
+ "type": 0,
+ "text": "Smart home represents a key part of Huawei's Seamless AI Life Strategy. The Smart Home project, which integrates innovative technologies such as HUAWEI HiLink, HarmonyOS, and HUAWEI HiCar, is a prototype for what a smart home can be in the Internet of Everything era."
+ },
+ {
+ "type": 2,
+ "image": "common/newsimages/smart-home.jpg"
+ },
+ {
+ "type": 0,
+ "text": "In the living room, it just takes a few words to wake up the smart assistant and enable the Back Home Mode. In this mode, the air purifier and warm light are turned on, and curtains are closed. These connected devices can all be controlled using the smart assistant. In the kitchen, you'll find a full complement of HarmonyOS-based household appliances. Establishing a network connection is as simple as tapping your phone against those devices. A card will be displayed, from which you can control them at any time."
+ },
+ {
+ "type": 2,
+ "image": "common/newsimages/dining-room.jpg"
+ },
+ {
+ "type": 0,
+ "text": "In the coming Internet of Everything era, living in a smart home is no longer merely about installing smart devices at home. The focus is now shifting to how those devices will form a virtual world and become an extension of human senses, as well as improving how we interact with those devices by developing a repertoire of intuitive voice and gesture commands. Smart devices powered by AI sensing and computing capabilities can sense users' behaviors, monitor their health indicators, and even understand their emotions, to better grease the wheels of daily life."
+ }
+ ]
+}
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/.gitignore" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/.gitignore"
new file mode 100644
index 0000000000000000000000000000000000000000..7d5b7a94f4dcf381f03ff21f28f8a2494b58023f
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/.gitignore"
@@ -0,0 +1,2 @@
+/build
+/node_modules
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/build.gradle" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/build.gradle"
new file mode 100644
index 0000000000000000000000000000000000000000..858ca0bf7603f4a7ea7884a95085182cae5b363f
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/build.gradle"
@@ -0,0 +1,26 @@
+apply plugin: 'com.huawei.ohos.hap'
+apply plugin: 'com.huawei.ohos.decctest'
+//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
+ohos {
+ compileSdkVersion 6
+ defaultConfig {
+ compatibleSdkVersion 6
+ }
+ buildTypes {
+ release {
+ proguardOpt {
+ proguardEnabled false
+ rulesFiles 'proguard-rules.pro'
+ }
+ }
+ }
+}
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar', '*.har'])
+ testImplementation 'junit:junit:4.13.1'
+ ohosTestImplementation 'com.huawei.ohos.testkit:runner:1.0.0.200'
+ implementation project(path: ':commonlib')
+}
+decc {
+ supportType = ['html', 'xml']
+}
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/package.json" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/package.json"
new file mode 100644
index 0000000000000000000000000000000000000000..0967ef424bce6791893e9a57bb952f80fd536e93
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/package.json"
@@ -0,0 +1 @@
+{}
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/proguard-rules.pro" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/proguard-rules.pro"
new file mode 100644
index 0000000000000000000000000000000000000000..f7666e47561d514b2a76d5a7dfbb43ede86da92a
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/proguard-rules.pro"
@@ -0,0 +1 @@
+# config module specific ProGuard rules here.
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/config.json" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/config.json"
new file mode 100644
index 0000000000000000000000000000000000000000..380947242e7afd112f923beb7862cc4d4926807a
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/config.json"
@@ -0,0 +1,108 @@
+{
+ "app": {
+ "bundleName": "com.example.myapplication",
+ "vendor": "example",
+ "version": {
+ "code": 1000000,
+ "name": "1.0.0"
+ }
+ },
+ "deviceConfig": {},
+ "module": {
+ "package": "com.example.myapplication",
+ "name": ".MyApplication",
+ "mainAbility": "com.example.myapplication.MainAbility",
+ "deviceType": [
+ "phone"
+ ],
+ "distro": {
+ "deliveryWithInstall": true,
+ "moduleName": "entry",
+ "moduleType": "entry",
+ "installationFree": false
+ },
+ "abilities": [
+ {
+ "skills": [
+ {
+ "entities": [
+ "entity.system.home"
+ ],
+ "actions": [
+ "action.system.home"
+ ]
+ }
+ ],
+ "visible": true,
+ "name": "com.example.myapplication.MainAbility",
+ "icon": "$media:icon",
+ "description": "$string:mainability_description",
+ "label": "$string:entry_MainAbility",
+ "type": "page",
+ "launchType": "singleton"
+ },
+ {
+ "visible": true,
+ "name": "com.example.myapplication.DeviceSelectAbility",
+ "icon": "$media:icon",
+ "description": "$string:deviceselectability_description",
+ "label": "$string:entry_MainAbility",
+ "type": "page",
+ "launchType": "singleton"
+ },
+ {
+ "visible": true,
+ "icon": "$media:icon",
+ "name": "com.example.myapplication.WebViewAbility",
+ "description": "$string:webviewability_description",
+ "label": "$string:entry_MainAbility",
+ "type": "page",
+ "launchType": "standard"
+ }
+ ],
+ "js": [
+ {
+ "pages": [
+ "pages/index/index",
+ "pages/detail/detail",
+ "pages/remote_controller/controller"
+ ],
+ "name": "default",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": true
+ }
+ },
+ {
+ "pages": [
+ "pages/selectdevice/selectdevice"
+ ],
+ "name": "selectdevice",
+ "window": {
+ "designWidth": 720,
+ "autoDesignWidth": true
+ }
+ }
+ ],
+ "reqPermissions": [
+ {
+ "name": "ohos.permission.INTERNET"
+ },
+ {
+ "name": "ohos.permission.DISTRIBUTED_DATASYNC"
+ },
+ {
+ "name": "ohos.permission.DISTRIBUTED_DEVICE_STATE_CHANGE"
+ },
+ {
+ "name": "ohos.permission.GET_DISTRIBUTED_DEVICE_INFO"
+ },
+ {
+ "name": "ohos.permission.GET_BUNDLE_INFO"
+ },
+ {
+ "name": "ohos.permission.KEEP_BACKGROUND_RUNNING"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/java/com/example/myapplication/DeviceSelectAbility.java" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/java/com/example/myapplication/DeviceSelectAbility.java"
new file mode 100644
index 0000000000000000000000000000000000000000..485adbd92711e2c30352a61f044529f40a08f534
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/java/com/example/myapplication/DeviceSelectAbility.java"
@@ -0,0 +1,22 @@
+package com.example.myapplication;
+
+import ohos.aafwk.content.Intent;
+import ohos.ace.ability.AceAbility;
+
+/**
+ * DeviceSelectAbility to invoke DeviceSelectInternalAbility.register() method
+ */
+public class DeviceSelectAbility extends AceAbility {
+ @Override
+ public void onStart(Intent intent) {
+ DeviceSelectInternalAbility.register(this);
+ setInstanceName("selectdevice");
+ setPageParams("pages/selectdevice/selectdevice", intent.getParams());
+ super.onStart(intent);
+ }
+
+ @Override
+ public void onStop() {
+ super.onStop();
+ }
+}
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/java/com/example/myapplication/DeviceSelectInternalAbility.java" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/java/com/example/myapplication/DeviceSelectInternalAbility.java"
new file mode 100644
index 0000000000000000000000000000000000000000..0d64eace9865c256dd92772f72f8b15a95a1e7b0
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/java/com/example/myapplication/DeviceSelectInternalAbility.java"
@@ -0,0 +1,85 @@
+package com.example.myapplication;
+
+import ohos.ace.ability.AceInternalAbility;
+import ohos.app.AbilityContext;
+import ohos.distributedschedule.interwork.DeviceInfo;
+import ohos.distributedschedule.interwork.DeviceManager;
+import ohos.hiviewdfx.HiLog;
+import ohos.hiviewdfx.HiLogLabel;
+import ohos.rpc.MessageOption;
+import ohos.rpc.MessageParcel;
+import ohos.rpc.RemoteException;
+import ohos.utils.zson.ZSONArray;
+import ohos.utils.zson.ZSONObject;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * deviceSelectInternalAbility declare business logic to react according
+ * to messageCode sent from FA(written by javascript)
+ */
+class DeviceSelectInternalAbility extends AceInternalAbility {
+ private static final int ACTION_REQUEST_DEVICE_LIST = 1001;
+ private static final HiLogLabel TAG = new HiLogLabel(0, 0, "DeviceSelectInternalAbility");
+ private static DeviceSelectInternalAbility INSTANCE;
+ private final AbilityContext context;
+
+ /**
+ * constructor of DeviceSelectInternalAbility
+ *
+ * @param context ability context
+ */
+ private DeviceSelectInternalAbility(AbilityContext context) {
+ super("com.example.myapplication.phone", "DeviceSelectInternalAbility");
+ this.context = context;
+ }
+
+ /**
+ * set InternalAbilityHandler for instance of DeviceSelectInternalAbility
+ *
+ * @param context ability context
+ */
+ static void register(AbilityContext context) {
+ INSTANCE = new DeviceSelectInternalAbility(context);
+ INSTANCE.setInternalAbilityHandler((code, data, reply, option)
+ -> INSTANCE.onRemoteRequest(code, data, reply, option));
+ }
+
+ /**
+ * react to remote request due to different ACTION_CODE, you should make sure ACTION_CODE is same at FA and PA.
+ *
+ * @param code ACTION_CODE
+ * @param data currently excessive
+ * @param reply reply for remote request
+ * @param option currently excessive
+ * @return whether request is correctly reply
+ * @throws RemoteException when action for remote request went wrong
+ */
+ private boolean onRemoteRequest(int code, MessageParcel data, MessageParcel reply, MessageOption option) throws
+ RemoteException {
+ if (code == ACTION_REQUEST_DEVICE_LIST) {
+ context.requestPermissionsFromUser(new String[]{"ohos.permission.DISTRIBUTED_DATASYNC"}, 0);
+ Map replyResult = new HashMap<>();
+ replyResult.put("code", 0);
+ ZSONArray zsonArray = new ZSONArray();
+ List devices = DeviceManager.getDeviceList(DeviceInfo.FLAG_GET_ONLINE_DEVICE);
+ HiLog.info(TAG, "Find online device count:" + devices.size());
+ for (DeviceInfo deviceInfo : devices) {
+ ZSONObject obj = new ZSONObject();
+ obj.put("name", deviceInfo.getDeviceName());
+ obj.put("type", deviceInfo.getDeviceType());
+ obj.put("id", deviceInfo.getDeviceId());
+ obj.put("debugMode", MainAbility.enableDebugMode());
+ zsonArray.add(obj);
+ }
+ replyResult.put("devices", zsonArray);
+ reply.writeString(ZSONObject.toZSONString(replyResult));
+ } else {
+ throw new RemoteException();
+ }
+
+ return true;
+ }
+}
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/java/com/example/myapplication/DistributeInternalAbility.java" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/java/com/example/myapplication/DistributeInternalAbility.java"
new file mode 100644
index 0000000000000000000000000000000000000000..2a4ab564217accef3e294b67cc82bc0195d2f109
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/java/com/example/myapplication/DistributeInternalAbility.java"
@@ -0,0 +1,123 @@
+package com.example.myapplication;
+
+import com.example.myapplication.constant.Command;
+import com.example.myapplication.remotedatabus.RemoteDataSender;
+
+import ohos.ace.ability.AceInternalAbility;
+import ohos.app.AbilityContext;
+import ohos.hiviewdfx.HiLog;
+import ohos.hiviewdfx.HiLogLabel;
+import ohos.rpc.MessageOption;
+import ohos.rpc.MessageParcel;
+import ohos.rpc.RemoteException;
+import ohos.utils.zson.ZSONObject;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * DistributeInternalAbility responsible for connect with remote device, also handle FA request : declare different
+ * business logic to react according to messageCode sent from FA.
+ */
+public class DistributeInternalAbility extends AceInternalAbility {
+ private static final HiLogLabel TAG = new HiLogLabel(0, 0, "DistributeInternalAbility");
+ private static final int CONNECT_ABILITY = 2000;
+ private static final int DISCONNECT_ABILITY = 2001;
+ private static final int SEND_MSG = 2002;
+ private static final int SUCCESS_CODE = 0;
+ private static final int FAIL_CODE = -1;
+ private static DistributeInternalAbility INSTANCE;
+ private final AbilityContext context;
+ private String selectDeviceId;
+
+ /**
+ * default constructor
+ *
+ * @param context ability context
+ */
+ public DistributeInternalAbility(AbilityContext context) {
+ super("com.example.myapplication.phone", "DistributeInternalAbility");
+ this.context = context;
+ }
+
+ /**
+ * setInternalAbilityHandler for DistributeInternalAbility instance
+ *
+ * @param context ability context
+ */
+ static void register(AbilityContext context) {
+ INSTANCE = new DistributeInternalAbility(context);
+ INSTANCE.setInternalAbilityHandler((code, data, reply, option) ->
+ INSTANCE.onRemoteRequest(code, data, reply, option));
+ }
+
+ /**
+ * destroy DistributeInternalAbility instance
+ */
+ private static void unregister() {
+ INSTANCE.destroy();
+ }
+
+ /**
+ * default destructor
+ */
+ private void destroy() {
+ }
+
+ /**
+ * hand click request from javascript
+ *
+ * @param code ACTION_CODE
+ * @param data data sent from javascript
+ * @param reply reply for javascript
+ * @param option currently excessive
+ * @return whether javascript click event is correctly responded
+ */
+ private boolean onRemoteRequest(int code, MessageParcel data, MessageParcel reply, MessageOption option) {
+ Map replyResult = new HashMap<>();
+ switch (code) {
+ // send message to remote device, message contains controller command from FA
+ case SEND_MSG: {
+ try {
+ ZSONObject dataParsed = ZSONObject.stringToZSON(data.readString());
+ int message = dataParsed.getIntValue("message");
+ int success = RemoteDataSender.sendMessage(selectDeviceId, Command.COMMAND_TV, message);
+ if (success == -1) {
+ boolean connectRes = RemoteDataSender.connectRemote(selectDeviceId, context);
+ if (!connectRes) {
+ throw new RemoteException();
+ }
+ }
+ assembleReplyResult(SUCCESS_CODE, replyResult, new Object(), reply);
+ } catch (RemoteException e) {
+ HiLog.error(TAG, "DistributeInternalAbility Exception " + e);
+ }
+ break;
+ }
+ // to invoke remote device's newsShare ability and send news url we transfer
+ case CONNECT_ABILITY: {
+ ZSONObject dataParsed = ZSONObject.stringToZSON(data.readString());
+ selectDeviceId = dataParsed.getString("deviceId");
+ boolean result = RemoteDataSender.connectRemote(selectDeviceId, context);
+ assembleReplyResult(result ? SUCCESS_CODE : FAIL_CODE, replyResult, new Object(), reply);
+ break;
+ }
+ // when controller FA went to destroy lifeCycle, disconnect with remote newsShare ability
+ case DISCONNECT_ABILITY: {
+ RemoteDataSender.disConnectRemote(selectDeviceId, context);
+ assembleReplyResult(SUCCESS_CODE, replyResult, new Object(), reply);
+ unregister();
+ break;
+ }
+ default:
+ HiLog.error(TAG, "messageCode not handle properly in phone distributeInternalAbility");
+ }
+ return true;
+ }
+
+ private void assembleReplyResult(int code, Map replyResult, Object content, MessageParcel reply) {
+ replyResult.put("code", code);
+ replyResult.put("content", content);
+ reply.writeString(ZSONObject.toZSONString(replyResult));
+ }
+}
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/java/com/example/myapplication/MainAbility.java" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/java/com/example/myapplication/MainAbility.java"
new file mode 100644
index 0000000000000000000000000000000000000000..0263b80f0bf8f86d104338be1440980b3f7e0bd8
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/java/com/example/myapplication/MainAbility.java"
@@ -0,0 +1,60 @@
+package com.example.myapplication;
+
+import com.example.myapplication.newsdata.NewsInfoInternalAbility;
+
+import ohos.aafwk.content.Intent;
+import ohos.ace.ability.AceAbility;
+import ohos.bundle.AbilityInfo;
+
+/**
+ * This template is a NewsShare demo to show the possibility of DistributeAbility of HarmonyOS.
+ * The general business logic of this template is: when we read news on a phone we can transfer
+ * specific news detail to SMART_TV or another phone, if the destination is TV, the phone will
+ * router to controller page where we can send command to control news reading on the TV.
+ *
+ * Currently our demo read news from json, you can rewrite get news method in NewsInfo.java to
+ * choose different data source. And news content can also contains video you can extend this
+ * template with more functions.
+ *
+ * By the way, if you don't have a smart_TV as debug device, you can enable DEBUG_MODE below
+ * to make your phone recognize your another phone as TV. You should install TV hap to your
+ * another phone to make it as an TV instance, and install a "DEBUG_MODE" enabled hap to your
+ * phone.
+ */
+public class MainAbility extends AceAbility {
+
+ /**
+ * If you need to simulate TV by your phone, please follow the instructions below.
+ * 0.enable DEBUG_MODE and install this phone hap to your phone A.
+ * 1.install TV hap to your phone B to make it a TV instance.
+ *
+ * @return DEBUG_MODE
+ */
+ static boolean enableDebugMode() {
+ // default: true,which mean your another phone is simulated as TV.
+ return true;
+ }
+
+ @Override
+ public void onStart(Intent intent) {
+ NewsInfoInternalAbility.register(this);
+ DistributeInternalAbility.register(this);
+ setDisplayOrientation(AbilityInfo.DisplayOrientation.PORTRAIT);
+ setInstanceName("default");
+ super.onStart(intent);
+ }
+
+ @Override
+ public void onNewIntent(Intent intent) {
+ if (intent.hasParameter("deviceId")) {
+ pushPage("pages/remote_controller/controller", intent.getParams());
+ }
+ super.onNewIntent(intent);
+ }
+
+ @Override
+ public void onStop() {
+ super.onStop();
+ }
+
+}
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/java/com/example/myapplication/MyApplication.java" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/java/com/example/myapplication/MyApplication.java"
new file mode 100644
index 0000000000000000000000000000000000000000..33915e2cc691b0fa169fd0a13e2262ac3925bafd
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/java/com/example/myapplication/MyApplication.java"
@@ -0,0 +1,10 @@
+package com.example.myapplication;
+
+import ohos.aafwk.ability.AbilityPackage;
+
+public class MyApplication extends AbilityPackage {
+ @Override
+ public void onInitialize() {
+ super.onInitialize();
+ }
+}
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/java/com/example/myapplication/WebViewAbility.java" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/java/com/example/myapplication/WebViewAbility.java"
new file mode 100644
index 0000000000000000000000000000000000000000..05267263c5f2e8d670f2226a8f7098f6603a8934
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/java/com/example/myapplication/WebViewAbility.java"
@@ -0,0 +1,190 @@
+package com.example.myapplication;
+
+import com.example.myapplication.newsdata.NewsInfo;
+
+import ohos.aafwk.ability.Ability;
+import ohos.aafwk.content.Intent;
+import ohos.aafwk.content.IntentParams;
+import ohos.aafwk.content.Operation;
+
+import ohos.agp.components.Button;
+import ohos.agp.components.ProgressBar;
+import ohos.agp.components.webengine.BrowserAgent;
+import ohos.agp.components.webengine.Navigator;
+import ohos.agp.components.webengine.WebAgent;
+import ohos.agp.components.webengine.WebView;
+
+import ohos.hiviewdfx.HiLog;
+import ohos.hiviewdfx.HiLogLabel;
+
+import ohos.utils.zson.ZSONObject;
+
+/**
+ * WebViewAbility implements Web Page browsing function in the app.
+ */
+public class WebViewAbility extends Ability {
+ private static final HiLogLabel TAG = new HiLogLabel(0, 0, "WebViewAbility");
+ private static final String SHARING_EXTRA_INFO = "sharing_fa_extra_info";
+ private static final String INIT_WEB_PAGE = "web_page";
+ private static final String INIT_INDEX = "index";
+ private WebView webView;
+ private ProgressBar progressBar;
+ private Button buttonBack;
+ private Button buttonTrans;
+ private String webPage;
+ private int newsIndex;
+ private NewsInfo newsInfo;
+
+ @Override
+ public void onStart(Intent intent) {
+ super.onStart(intent);
+ super.setUIContent(ResourceTable.Layout_webview_detail);
+ initComponent();
+ newsInfo = NewsInfo.getInstance(this);
+
+ IntentParams intentParams = intent.getParams();
+ if (intentParams.hasParam("__startParams")) {
+ ZSONObject newZson = ZSONObject.stringToZSON(intentParams.getParam("__startParams").toString());
+ this.webPage = newZson.getString(INIT_WEB_PAGE);
+ this.newsIndex = Integer.parseInt(newZson.getString(INIT_INDEX));
+ }
+
+ String shareInfo = intent.getStringParam(SHARING_EXTRA_INFO);
+ if (shareInfo != null) {
+ this.newsIndex = Integer.parseInt(shareInfo);
+ this.webPage = newsInfo.getWebNewsUrl(this.newsIndex);
+ }
+
+ configComponent();
+ }
+
+ @Override
+ public void onNewIntent(Intent intent) {
+ String shareInfo = intent.getStringParam(SHARING_EXTRA_INFO);
+ if (shareInfo != null) {
+ this.newsIndex = Integer.parseInt(shareInfo);
+ this.webPage = newsInfo.getWebNewsUrl(this.newsIndex);
+ }
+ webView.load(this.webPage);
+ super.onNewIntent(intent);
+ }
+
+ private void initComponent() {
+ this.webView = (WebView) findComponentById(ResourceTable.Id_webview);
+ this.progressBar = (ProgressBar) findComponentById(ResourceTable.Id_progressbar);
+ this.buttonBack = (Button) findComponentById(ResourceTable.Id_button_back);
+ this.buttonTrans = (Button) findComponentById(ResourceTable.Id_button_transfer);
+ }
+
+ private void configComponent() {
+ webView.load(this.webPage);
+ webView.setWebAgent(new WebAgent());
+ webView.getWebConfig().setJavaScriptPermit(true);
+ webView.setBrowserAgent(new BrowserAgent(this) {
+ @Override
+ public void onProgressUpdated(WebView webView, int newProgress) {
+ super.onProgressUpdated(webView, newProgress);
+ if (newProgress == 100) {
+ progressBar.setVisibility(WebView.HIDE);
+ } else {
+ progressBar.setVisibility(WebView.VISIBLE);
+ progressBar.setProgressValue(newProgress);
+ }
+ }
+ });
+ Navigator navigator = webView.getNavigator();
+ if (navigator.canGoBack()) {
+ navigator.goBack();
+ }
+ if (navigator.canGoForward()) {
+ navigator.goForward();
+ }
+
+ this.buttonBack.setClickedListener(component -> {
+ if (navigator.canGoBack()) {
+ navigator.goBack();
+ } else {
+ onBackPressed();
+ }
+ });
+
+ this.buttonTrans.setClickedListener(component -> {
+ Intent newIntent = new Intent();
+ newIntent.setParam("title", this.webPage);
+ Operation operation = new Intent.OperationBuilder()
+ .withBundleName(getBundleName())
+ .withAbilityName(DeviceSelectAbility.class.getName())
+ .build();
+ newIntent.setOperation(operation);
+ startAbilityForResult(newIntent, 0);
+ });
+ }
+
+ @Override
+ protected void onAbilityResult(int requestCode, int resultCode, Intent resultData) {
+ if (resultData == null) {
+ return;
+ }
+ super.onAbilityResult(requestCode, resultCode, resultData);
+
+ ZSONObject newZson = ZSONObject.classToZSON(resultData);
+ String deviceName = newZson.getZSONObject("params").getZSONObject("params").getZSONObject("resultData")
+ .getZSONObject("result").getString("deviceName");
+ String deviceType = newZson.getZSONObject("params").getZSONObject("params").getZSONObject("resultData")
+ .getZSONObject("result").getString("deviceType");
+ String deviceId = newZson.getZSONObject("params").getZSONObject("params").getZSONObject("resultData")
+ .getZSONObject("result").getString("deviceId");
+ if (deviceId == null || "".equals(deviceId)) {
+ return;
+ }
+ boolean debugMode = newZson.getZSONObject("params").getZSONObject("params").getZSONObject("resultData")
+ .getZSONObject("result").getBoolean("deviceDebugMode");
+
+ Intent newIntent = new Intent();
+ Intent.OperationBuilder operationBuilder = new Intent.OperationBuilder().withDeviceId(deviceId)
+ .withBundleName("com.example.myapplication").withFlags(Intent.FLAG_ABILITYSLICE_MULTI_DEVICE);
+ Operation operation;
+
+ // when transferring to smartphone which simulated as tv, add debugMode here
+ if ("SMART_TV".equals(deviceType)) {
+ newIntent.setParam("newsUrl", newsInfo.getNewsUrl(this.newsIndex));
+ operation = operationBuilder.withAbilityName(MainAbility.class.getName()).build();
+ newIntent.setOperation(operation);
+ startAbility(newIntent);
+
+ Intent localIntent = new Intent();
+ localIntent.setParam("newsUrl", newsInfo.getNewsUrl(this.newsIndex));
+ localIntent.setParam("newsTitle", newsInfo.getNewsTitle(this.newsIndex));
+ localIntent.setParam("newsImage", newsInfo.getNewsImage(this.newsIndex));
+ localIntent.setParam("deviceId", deviceId);
+ localIntent.setParam("deviceType", deviceType);
+ localIntent.setParam("deviceName", deviceName);
+
+ Operation localOpt = new Intent.OperationBuilder()
+ .withDeviceId("")
+ .withBundleName("com.example.myapplication")
+ .withAbilityName(MainAbility.class.getName())
+ .build();
+ localIntent.setOperation(localOpt);
+ startAbility(localIntent);
+ } else if ("SMART_PHONE".equals(deviceType)) {
+ newIntent.setParam(SHARING_EXTRA_INFO, String.valueOf(this.newsIndex));
+ operation = operationBuilder.withAbilityName(WebViewAbility.class.getName()).build();
+ newIntent.setOperation(operation);
+ startAbility(newIntent);
+ } else {
+ HiLog.error(TAG, "Device Type Error, please Try Again");
+ }
+ }
+
+ @Override
+ protected void onActive() {
+ super.onActive();
+ }
+
+ @Override
+ public void onStop() {
+ super.onStop();
+ }
+
+}
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/app.js" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/app.js"
new file mode 100644
index 0000000000000000000000000000000000000000..aedcefe0054c6e16c40491f4d1abc20a4dc1c6ef
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/app.js"
@@ -0,0 +1,8 @@
+export default {
+ onCreate() {
+ console.info('AceApplication onCreate');
+ },
+ onDestroy() {
+ console.info('AceApplication onDestroy');
+ }
+};
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_back.png" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_back.png"
new file mode 100644
index 0000000000000000000000000000000000000000..22e9f34d99d41d9199ab1a979838a041c331803f
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_back.png" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_back.svg" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_back.svg"
new file mode 100644
index 0000000000000000000000000000000000000000..cf99b03acd1f35fd4713dea424402544c5a64fd0
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_back.svg"
@@ -0,0 +1,14 @@
+
+
+
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_comments.svg" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_comments.svg"
new file mode 100644
index 0000000000000000000000000000000000000000..2c0b1718a687ba984cb042320210bec9c21bcb3a
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_comments.svg"
@@ -0,0 +1,31 @@
+
+
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_device_matebook.png" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_device_matebook.png"
new file mode 100644
index 0000000000000000000000000000000000000000..8be6cf916b17de6303924cdce635cf3ec76f4f44
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_device_matebook.png" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_device_phone.png" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_device_phone.png"
new file mode 100644
index 0000000000000000000000000000000000000000..ba1df19f6585d203347b66c146968a8c5b2b7aab
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_device_phone.png" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_device_tv.png" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_device_tv.png"
new file mode 100644
index 0000000000000000000000000000000000000000..d549ddb789387467f45a4b955d91a22d9812f2ce
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_device_tv.png" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_huawei_share.svg" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_huawei_share.svg"
new file mode 100644
index 0000000000000000000000000000000000000000..79e331c8da5cdbaf230aa1de15a5729151bfd60b
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_huawei_share.svg"
@@ -0,0 +1,30 @@
+
+
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_huaweishare.png" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_huaweishare.png"
new file mode 100644
index 0000000000000000000000000000000000000000..c14a8cc70720be992670d634bd95e8295e754b6d
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_huaweishare.png" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_menu.svg" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_menu.svg"
new file mode 100644
index 0000000000000000000000000000000000000000..1d23bbb903cffec423ef487bec69921c27fde0b9
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_menu.svg"
@@ -0,0 +1,20 @@
+
+
+
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_mic.svg" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_mic.svg"
new file mode 100644
index 0000000000000000000000000000000000000000..765ebba96e5264734b432cf9f632d4c6604ddfbd
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_mic.svg"
@@ -0,0 +1,16 @@
+
+
+
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_more.png" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_more.png"
new file mode 100644
index 0000000000000000000000000000000000000000..7fa811d099d05046de4d8c4563eddb2ff8ba2d3b
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_more.png" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_more.svg" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_more.svg"
new file mode 100644
index 0000000000000000000000000000000000000000..ace904bfb90169100ffa26d4b66b4733beaf3e6d
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_more.svg"
@@ -0,0 +1,20 @@
+
+
+
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_more_edit.svg" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_more_edit.svg"
new file mode 100644
index 0000000000000000000000000000000000000000..ca75d8201c0de302c985f9485fd72e1a23eec0f0
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_more_edit.svg"
@@ -0,0 +1,79 @@
+
+
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_pause_norm.svg" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_pause_norm.svg"
new file mode 100644
index 0000000000000000000000000000000000000000..0f44feef7622886993fb79d7d322a7e526cc2679
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_pause_norm.svg"
@@ -0,0 +1,39 @@
+
+
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_transfer.png" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_transfer.png"
new file mode 100644
index 0000000000000000000000000000000000000000..6fa272e6f4aef8041d0da32a707a7305ea907e21
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_transfer.png" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_transfer.svg" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_transfer.svg"
new file mode 100644
index 0000000000000000000000000000000000000000..99cad3a5ef0befc5997401103975f926b5391bac
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_transfer.svg"
@@ -0,0 +1,73 @@
+
+
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_transfering.svg" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_transfering.svg"
new file mode 100644
index 0000000000000000000000000000000000000000..2a20288971a65eb9f25104e18d33861ea197ccc0
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/images/ic_transfering.svg"
@@ -0,0 +1,20 @@
+
+
+
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/huawei-hms-app-innovation-contest.jpg" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/huawei-hms-app-innovation-contest.jpg"
new file mode 100644
index 0000000000000000000000000000000000000000..01b2754bd02154e71021c2a9847d50d091c32c67
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/huawei-hms-app-innovation-contest.jpg" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/huawei-launches-freebuds-studio.jpg" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/huawei-launches-freebuds-studio.jpg"
new file mode 100644
index 0000000000000000000000000000000000000000..981de0c36766736e05362fd023ad11481be1182f
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/huawei-launches-freebuds-studio.jpg" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/huawei-launches-gentle-monster-eyewear.jpg" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/huawei-launches-gentle-monster-eyewear.jpg"
new file mode 100644
index 0000000000000000000000000000000000000000..2df03739feaecd7d5f49788c0c8fb94420b13bd5
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/huawei-launches-gentle-monster-eyewear.jpg" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/huawei-launches-petal-search-petal-map-1.jpg" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/huawei-launches-petal-search-petal-map-1.jpg"
new file mode 100644
index 0000000000000000000000000000000000000000..bf810f02c6ac923bf6e1a0b9b2f957b0ef705954
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/huawei-launches-petal-search-petal-map-1.jpg" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/huawei-unveil-porsche-design-huawei-watch-gt-2.jpg" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/huawei-unveil-porsche-design-huawei-watch-gt-2.jpg"
new file mode 100644
index 0000000000000000000000000000000000000000..2a61f89611598259a42146c31a661dd0b008169a
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/huawei-unveil-porsche-design-huawei-watch-gt-2.jpg" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/leap-further-ahead-with-huawei-mate-40.jpg" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/leap-further-ahead-with-huawei-mate-40.jpg"
new file mode 100644
index 0000000000000000000000000000000000000000..f2837ea925a92d57dfb06559c0ae7ebd49a177a9
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/leap-further-ahead-with-huawei-mate-40.jpg" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/mate40-series-web.jpg" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/mate40-series-web.jpg"
new file mode 100644
index 0000000000000000000000000000000000000000..2e42d96c8067c7a364c7521ae613073b3abab908
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/mate40-series-web.jpg" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/smart-home.jpg" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/smart-home.jpg"
new file mode 100644
index 0000000000000000000000000000000000000000..4ef3df0cee49c88338a9022289e2d1fc19a5420a
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/smart-home.jpg" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/watch-gt2-pro.jpg" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/watch-gt2-pro.jpg"
new file mode 100644
index 0000000000000000000000000000000000000000..4e3c407e1ccfd49addc56553f34bd6d63f24152c
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/watch-gt2-pro.jpg" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/woman-dev.jpg" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/woman-dev.jpg"
new file mode 100644
index 0000000000000000000000000000000000000000..57efdb78f5f58d75d039f2df23c7bf718518de66
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsimages/woman-dev.jpg" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsvideo/huawei-watch-gt2-pro-video.mp4" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsvideo/huawei-watch-gt2-pro-video.mp4"
new file mode 100644
index 0000000000000000000000000000000000000000..d180cc56a04931792846e5dbdde57691f03a9e7e
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsvideo/huawei-watch-gt2-pro-video.mp4" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsvideo/mate40-pv.mp4" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsvideo/mate40-pv.mp4"
new file mode 100644
index 0000000000000000000000000000000000000000..63b82908c67f0896f7e15da2d28c5bffbfc45fa4
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/newsvideo/mate40-pv.mp4" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/video/1.mp4" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/video/1.mp4"
new file mode 100644
index 0000000000000000000000000000000000000000..592abe4f4551198d5c4c25e346f66e523b21cd18
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/video/1.mp4" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/video/2.mp4" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/video/2.mp4"
new file mode 100644
index 0000000000000000000000000000000000000000..8ad9ba799eba39018fb8a9c015e35b92d396092c
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/video/2.mp4" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/video/daea3058dce77ddbb7a6faafe8b3ed4e.mp4" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/video/daea3058dce77ddbb7a6faafe8b3ed4e.mp4"
new file mode 100644
index 0000000000000000000000000000000000000000..e80c679a8c4f5bd96633ab1781937437d67469ec
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/common/video/daea3058dce77ddbb7a6faafe8b3ed4e.mp4" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/i18n/en-US.json" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/i18n/en-US.json"
new file mode 100644
index 0000000000000000000000000000000000000000..6ce917980f4a2c39deff445619e1abe65cd6f0d1
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/i18n/en-US.json"
@@ -0,0 +1,15 @@
+{
+ "strings": {
+ "hello": "Hello",
+ "world": "World",
+ "last_page": "Last page",
+ "next_page": "Next page",
+ "last_news": "Last news",
+ "next_news": "Next news",
+ "phone": "'s phone",
+ "on_showing": "on showing",
+ "recommend": "Recommend"
+ },
+ "Files": {
+ }
+}
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/i18n/zh-CN.json" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/i18n/zh-CN.json"
new file mode 100644
index 0000000000000000000000000000000000000000..d68b50244c1f488e3f1181c2f47b5194c9fa5d8f
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/i18n/zh-CN.json"
@@ -0,0 +1,15 @@
+{
+ "strings": {
+ "hello": "您好",
+ "world": "世界",
+ "last_page": "上一页",
+ "next_page": "下一页",
+ "last_news": "上一篇",
+ "next_news": "下一篇",
+ "phone": "的手机",
+ "on_showing": "正在展示",
+ "recommend": "为你推荐"
+ },
+ "Files": {
+ }
+}
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/pages/detail/detail.css" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/pages/detail/detail.css"
new file mode 100644
index 0000000000000000000000000000000000000000..1a22215d8c4b6a61b1d8e06fdcddb521d7fbaebc
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/pages/detail/detail.css"
@@ -0,0 +1,125 @@
+.container {
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ width: 100%;
+ background-color: #FAFAFA;
+}
+
+.news-page {
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ width: 100%;
+ flex: 1;
+}
+
+.bottom-bar {
+ width: 100%;
+ height: 48px;
+ background-color: #000000;
+}
+
+.news-item {
+ width: 100%;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+}
+
+.title-image {
+ width: 100%;
+ object-fit: fill;
+}
+
+.news-content {
+ width: 100%;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ margin-right: 16px;
+ margin-left: 16px;
+}
+
+.news-title {
+ margin-top: 24px;
+ width: 100%;
+ font-size: 24px;
+ line-height: 31.2px;
+ font-family: PingFangSC-Semibold;
+ color: #000000;
+}
+
+.news-date {
+ margin-top: 12px;
+ width: 100%;
+ font-size: 14px;
+ line-height: 18px;
+ font-family: HWtext-55ST;
+ color: #000000;
+}
+
+.article {
+ margin-top: 24px;
+ font-size: 17px;
+ width: 100%;
+ line-height: 27px;
+}
+
+.article_em {
+ margin-top: 12px;
+ font-size: 17px;
+ width: 100%;
+ line-height: 27px;
+ font-weight: bold;
+}
+
+.image {
+ width: 100%;
+ margin-top: 24px;
+ object-fit: fill;
+}
+
+.bottom-icon-back {
+ margin-top: 12px;
+ position: absolute;
+ left: 16px;
+ width: 24px;
+ height: 24px;
+ icon-width: 24px;
+ icon-height: 24px;
+ background-color: #000000;
+}
+
+.bottom-icon-share {
+ margin-top: 12px;
+ position: absolute;
+ right: 92px;
+ width: 24px;
+ height: 24px;
+ icon-width: 24px;
+ icon-height: 24px;
+ background-color: #000000;
+}
+
+.bottom-icon-transfer {
+ margin-top: 12px;
+ position: absolute;
+ right: 54px;
+ width: 24px;
+ height: 24px;
+ icon-width: 24px;
+ icon-height: 24px;
+ background-color: #000000;
+}
+
+.bottom-icon-more {
+ margin-top: 12px;
+ position: absolute;
+ right: 16px;
+ width: 24px;
+ height: 24px;
+ icon-width: 12px;
+ icon-height: 24px;
+ background-color: #000000;
+}
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/pages/detail/detail.hml" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/pages/detail/detail.hml"
new file mode 100644
index 0000000000000000000000000000000000000000..1be28d935d6b60e88c42a4a8634be067da614d70
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entry/src/main/js/default/pages/detail/detail.hml"
@@ -0,0 +1,39 @@
+
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entrytv/src/ohosTest/js/default/pages/index/index.js" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entrytv/src/ohosTest/js/default/pages/index/index.js"
new file mode 100644
index 0000000000000000000000000000000000000000..8be2df2479a8da755ed800ad70d2b6247e21b8a2
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entrytv/src/ohosTest/js/default/pages/index/index.js"
@@ -0,0 +1,41 @@
+import file from '@system.file'
+import app from '@system.app'
+import device from '@system.device'
+import router from '@system.router'
+import {Core, Constant, ExpectExtend, ReportExtend, InstrumentLog} from 'deccjsunit/index'
+
+export default {
+ data: {
+ title: ""
+ },
+ onInit() {
+ this.title = this.$t('strings.world');
+ },
+ onShow() {
+ console.info('onShow finish')
+ const core = Core.getInstance()
+ const expectExtend = new ExpectExtend({
+ 'id': 'extend'
+ })
+ const reportExtend = new ReportExtend(file)
+ const instrumentLog = new InstrumentLog({
+ 'id': 'report',
+ 'version': '1.0.3'
+ })
+ core.addService('expect', expectExtend)
+ core.addService('report', reportExtend)
+ core.addService('report', instrumentLog)
+ core.init()
+ core.subscribeEvent('spec', instrumentLog)
+ core.subscribeEvent('suite', instrumentLog)
+ core.subscribeEvent('task', instrumentLog)
+
+ const configService = core.getDefaultService('config')
+ configService.setConfig(this)
+
+ require('../../../test/List.test')
+ core.execute()
+ },
+ onReady() {
+ },
+}
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entrytv/src/ohosTest/js/test/ExampleJsunit.test.js" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entrytv/src/ohosTest/js/test/ExampleJsunit.test.js"
new file mode 100644
index 0000000000000000000000000000000000000000..b6d74caed96ddede98edd1bc9292f6568cd1cfd1
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entrytv/src/ohosTest/js/test/ExampleJsunit.test.js"
@@ -0,0 +1,10 @@
+import app from '@system.app'
+import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index'
+
+describe('appInfoTest', function () {
+ it('app_info_test_001', 0, function () {
+ var info = app.getInfo()
+ expect(info.versionName).assertEqual('1.0')
+ expect(info.versionCode).assertEqual('3')
+ })
+})
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entrytv/src/ohosTest/js/test/List.test.js" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entrytv/src/ohosTest/js/test/List.test.js"
new file mode 100644
index 0000000000000000000000000000000000000000..305eb5bb254cd4802afaffebe68fca2f9436159f
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entrytv/src/ohosTest/js/test/List.test.js"
@@ -0,0 +1 @@
+require('./ExampleJsunit.test.js')
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entrytv/src/ohosTest/resources/base/element/string.json" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entrytv/src/ohosTest/resources/base/element/string.json"
new file mode 100644
index 0000000000000000000000000000000000000000..0295ceeb179affbb076a7a4521c103bcaddf5530
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entrytv/src/ohosTest/resources/base/element/string.json"
@@ -0,0 +1,20 @@
+{
+ "string": [
+ {
+ "name": "entrytv_MainAbility",
+ "value": "entrytv_MainAbility"
+ },
+ {
+ "name": "entrytv_RemoteDataReceiverAbility",
+ "value": "entrytv_RemoteDataReceiverAbility"
+ },
+ {
+ "name": "mainability_description",
+ "value": "JS_TV_News Share Ability"
+ },
+ {
+ "name": "remotedatareceiverability_description",
+ "value": "JS_TV_News Share Ability"
+ }
+ ]
+}
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entrytv/src/ohosTest/resources/base/media/icon.png" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entrytv/src/ohosTest/resources/base/media/icon.png"
new file mode 100644
index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/entrytv/src/ohosTest/resources/base/media/icon.png" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/gradle.properties" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/gradle.properties"
new file mode 100644
index 0000000000000000000000000000000000000000..be492496f9a20ac2d980ef4fc30061f4184c1c40
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/gradle.properties"
@@ -0,0 +1,13 @@
+# 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.
+# This function is enabled by default when the DevEco Studio builds the hap/app,if you need disable gradle parallel,you should set org.gradle.parallel false.
+# more information see https://docs.gradle.org/current/userguide/performance.html
+# org.gradle.parallel=false
+# org.gradle.jvmargs=-Dfile.encoding=GBK
\ No newline at end of file
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/gradle/wrapper/gradle-wrapper.jar" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/gradle/wrapper/gradle-wrapper.jar"
new file mode 100644
index 0000000000000000000000000000000000000000..490fda8577df6c95960ba7077c43220e5bb2c0d9
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/gradle/wrapper/gradle-wrapper.jar" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/gradle/wrapper/gradle-wrapper.properties" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/gradle/wrapper/gradle-wrapper.properties"
new file mode 100644
index 0000000000000000000000000000000000000000..f59159e865d4b59feb1b8c44b001f62fc5d58df4
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/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/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/gradlew" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/gradlew"
new file mode 100644
index 0000000000000000000000000000000000000000..2fe81a7d95e4f9ad2c9b2a046707d36ceb3980b3
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/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/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/gradlew.bat" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/gradlew.bat"
new file mode 100644
index 0000000000000000000000000000000000000000..62bd9b9ccefea2b65ae41e5d9a545e2021b90a1d
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/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/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/package.json" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/package.json"
new file mode 100644
index 0000000000000000000000000000000000000000..0967ef424bce6791893e9a57bb952f80fd536e93
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/package.json"
@@ -0,0 +1 @@
+{}
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/settings.gradle" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/settings.gradle"
new file mode 100644
index 0000000000000000000000000000000000000000..8be43dc2f568e7b68abff462eeeb99c21206cdd3
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/MyApplication2/settings.gradle"
@@ -0,0 +1 @@
+include ':entry', ':commonlib', ':entrytv'
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/demo-gif/IMG_8128.GIF" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/demo-gif/IMG_8128.GIF"
new file mode 100644
index 0000000000000000000000000000000000000000..4660741bc310ea89919a9ce1d92a32c18085cf1c
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/demo-gif/IMG_8128.GIF" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/demo-gif/IMG_8129.GIF" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/demo-gif/IMG_8129.GIF"
new file mode 100644
index 0000000000000000000000000000000000000000..15dd029321f1aa83a24dcec0077e09aa2cd80c13
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/demo-gif/IMG_8129.GIF" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/demo-gif/IMG_8130.GIF" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/demo-gif/IMG_8130.GIF"
new file mode 100644
index 0000000000000000000000000000000000000000..eeb077dafc06de0e3be79a8b22e0777ea63bcf30
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/demo-gif/IMG_8130.GIF" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/demo-gif/IMG_8131.GIF" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/demo-gif/IMG_8131.GIF"
new file mode 100644
index 0000000000000000000000000000000000000000..bbd855d12f304c5cb9dc87cf3022a6b9ec4f69df
Binary files /dev/null and "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/demo-gif/IMG_8131.GIF" differ
diff --git "a/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/local.properties" "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/local.properties"
new file mode 100644
index 0000000000000000000000000000000000000000..69dbbee6e963deafdb2ecb6a752bd76916705119
--- /dev/null
+++ "b/\351\231\210\344\275\263\347\232\204\345\217\202\350\265\233\344\275\234\345\223\201/local.properties"
@@ -0,0 +1,12 @@
+## This file is automatically generated by DevEco Studio.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must *NOT* be checked into Version Control Systems,
+# as it contains information specific to your local configuration.
+#
+# Location of the SDK. This is only used by Gradle.
+# For customization when using a Version Control System, please read the
+# header note.
+#Wed Oct 13 09:19:14 CST 2021
+nodejs.dir=C\:\\Program Files\\Huawei\\DevEco Studio 3.0.0.600\\tools\\nodejs
+hwsdk.dir=D\:\\backup\\n021823\\AppData\\Local\\Huawei\\Sdk