Skip to content

Commit

Permalink
Update README.md and README_ZH.md.
Browse files Browse the repository at this point in the history
  • Loading branch information
daifengchao committed Sep 3, 2021
1 parent f0e51da commit f45573a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,15 @@ public class MyAppHubDataBridgeClient extends AppHubDataBridgeClient {
}
````

## setValue and getValue
## Main function
### Cloud Applications set/get data from local applications
Complete the business logic related to setting data and obtaining data in the setValue and getValue methods of your inherited class

## reportData
### Local applications actively report data to cloud applications
Call the reportdatasync or reportDataAsync method with the object of your implementation class to send data to the cloud application
### reportDataSync(ReportData data) method
#### reportDataSync(ReportData data) method
When reportDataSync() sends data, it will wait for the response from the cloud application, it may take time, so it can not be invoked in the main thread.
### reportDataAsync(ReportData data) method
#### reportDataAsync(ReportData data) method
When the reportDataAsync() method sends data, the data will be returned immediately after it is sent to the apphub agent, so the time when the cloud application receives the data cannot be determined


Expand Down
10 changes: 5 additions & 5 deletions README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ public class MyAppHubDataBridgeClient extends AppHubDataBridgeClient {
myAppHubDataBridgeClient.bindDataBridgeService(dataBridgeServiceConnection);
}
````

## 云端应用向本地应用设置/获取数据
## 主要功能
### 云端应用向本地应用设置/获取数据
在你的继承类的setValue和getValue方法中完成设置数据和获取数据的相关的业务逻辑

## 本地应用向云端应用主动上报数据
### 本地应用向云端应用主动上报数据
用你实现类的对象调用reportDataSync或reportDataAsync方法向cloud应用程序发送数据
### reportDataSync(ReportData data)方法
#### reportDataSync(ReportData data)方法
reportDataSync()方法发送数据时,会等待cloud应用的回应,可能会耗时,因此不能在主线程中调用
### reportDataAsync(ReportData data)方法
#### reportDataAsync(ReportData data)方法
int reportDataAsync()方法发送数据时,数据发送到Apphub Agent后就会立即返回,所以cloud应用接收到数据的时机无法确定


Expand Down

0 comments on commit f45573a

Please sign in to comment.