Name Date Size

..25-Oct-20244 KiB

.gitignoreH A D25-Oct-2024100

AppScope/H25-Oct-20244 KiB

build-profile.json5H A D25-Oct-20241.1 KiB

entry/H25-Oct-20244 KiB

hvigor/H25-Oct-20244 KiB

hvigorfile.jsH A D25-Oct-2024168

hvigorwH A D25-Oct-20242 KiB

hvigorw.batH A D25-Oct-20242 KiB

oh-package.json5H A D25-Oct-2024820

ohosTest.mdH A D25-Oct-20241.5 KiB

README.mdH A D25-Oct-20241.4 KiB

README_zh.mdH A D25-Oct-20248.9 KiB

screenshots/devices/H25-Oct-20244 KiB

README.md

1# Distributed Notepad
2
3### Introduction
4
5This sample shows how to implement a simple distributed Notepad using distributed data objects in eTS. The display effect is as follows:
6
7![home](screenshots/devices/home_en.png)
8
9### Concepts
10
11Distributed data object: You can synchronize data between devices on a network by configuring distributed data objects with the same session ID for these devices. When a distributed object is modified, the peer device can listen for data changes and obtain new data.
12
13### Required Permissions
14
15ohos.permission.DISTRIBUTED_DATASYNC
16
17### Usage
18
191. Start the app, touch the button in the upper right corner, and select the device to connect. After the connection is successful, the home screens of the two devices are displayed in green. Each time you connect to another device, the notes will be cleared.
20
212. To add a note, touch the **Add** button, edit the title and note content, mark color, and touch the **Submit** button.
22
233. To clear all notes, touch the **Clear** button.
24
254. To modify a note, touch the note, modify the note content, and touch **Submit**.
26
275. The operations performed in steps 2, 3, and 4 are synchronized to the connected device.
28
29### Constraints
30
31- This sample can only be run on standard-system devices.
32
33- This sample is based on the stage model, which is supported from API version 9.
34
35- This sample requires DevEco Studio 3.1 Canary1 (Build Version: 3.1.0.100) to compile and run. 
36