completed README.md

This commit is contained in:
strawmanbobi
2026-01-31 21:30:54 +08:00
parent 8a665776e7
commit 733d111528
3 changed files with 62 additions and 5 deletions

View File

@@ -4,7 +4,7 @@ This project shows how can you develop an Android APP remote controller quickly.
The key components of the Android remote example includes:
## The Cloud-SDK
## <img src='app/src/main/res/mipmap-xxhdpi/button_home.png' style='padding-top: 12px; height: 32px; width: 20px;'> Use The Cloud-SDK to Index Remote
The Cloud SDK calls the Rest API provided by the IRext index service to complete the APP login and
help use indexing targeted remote controller from category to remote index.
@@ -17,7 +17,6 @@ implementation 'net.irext.webapi:irext-androidapi:1.5.2
And then add the meta-data in your AndroidManifest.xml to make the Cloud SDK login to the indexing server for the access token
```xml
<meta-data
android:name="irext_app_key"
android:value="c49c3bd5ff6b3efb67d8af2c" />
@@ -29,7 +28,7 @@ And then add the meta-data in your AndroidManifest.xml to make the Cloud SDK log
Follow the examples of calling `mApp.mWeAPIs` in corresponding UI flows in order to find the targeted remote index, download the remote control binary file.
## Use Mobile Phone as Remote Control
## <img src='app/src/main/res/mipmap-xxhdpi/button_power.png' style='padding-top: 12px; height: 32px; width: 20px;'> Use Mobile Phone as Remote Control
After the remote index binary code is downloaded, you can see the remote control panel,
by pressing control buttons, the binary code would be decoded into IR timing series. If you have an Android phone with IR transmitter,
you can send the 38KHz infra-red waves directly to control the home appliances.
@@ -39,10 +38,20 @@ As a reference, you need to integrate the IR decode library, see the shared libr
By calling API provided by the decode library in order to open and decode remote control binary files into infra-red timing series:
```java
public int irControl(int category, int subCategory, int keyCode) {
int []decoded;
StringBuilder debugStr = new StringBuilder();
ACStatus acStatus = new ACStatus();
int inputKeyCode = ControlHelper.translateKeyCode(category, keyCode, acStatus);
decoded = mIRDecode.decodeBinary(inputKeyCode, acStatus);
ControlHelper.transmitIr(mContext, decoded);
return 0;
}
```
## Working with Arduino Remote Control <img src='app/src/main/res/mipmap-xxhdpi/button_link.png' style='padding-top: 12px; height: 32px; width: 20px;'>
**Here you need to manage your AC Status in Android application according to user interactions.**
## <img src='app/src/main/res/mipmap-xxhdpi/button_link.png' style='padding-top: 12px; height: 32px; width: 20px;'> Working with Arduino Remote Control
There is another example project <a href='https://opensource.irext.net/irext/examples/-/tree/master/arduino-example'>arduino-example</a> which can be co-worked with this
Android APP remote controller.