ABox SDK Sample
中文说明
本目录归档了原 aboxtest Android 工程,用于参考 ABSDK 0630 的接入和调用方式。归档只修改了外层目录名,原工程名、模块名、包名和源码结构均保持不变。
模块
login-mac:主要参考模块,演示 ABSDK 登录、记住密码、自动登录、错误码映射和插座控制。myapplication:原工程附带的 Android Studio 示例模块,主要包含基础导航、登录界面和 SQLite 辅助类骨架。
重要文件
login-mac/libs/libABSDK0630.jar:ABSDK 0630 二进制依赖。login-mac/src/main/java/tr/dhee/abox/demo/data/LoginDataSource.java:SDK 登录调用。login-mac/src/main/java/tr/dhee/abox/demo/data/SwitchDataSource.java:插座控制调用。login-mac/src/main/java/tr/dhee/abox/demo/ui/login/LoginActivity.java:登录、记住密码和自动登录流程。login-mac/src/main/java/tr/dhee/abox/demo/ui/switchcontrol/SwitchControlActivity.java:插座控制界面。login-mac/src/main/java/tr/dhee/abox/demo/utils/AboxConstants.java:ABSDK 错误码映射。
归档清理
归档时已排除以下本机状态、构建产物和敏感文件:
.gradle/、.idea/和所有build/目录;local.properties和.DS_Store;- APK、keystore、JKS、备份文件和损坏的 JAR 备份。
使用限制
本目录仅作为历史实现和 SDK 行为参考,不代表 ABox Manager 正式应用的目标架构,也不保证能够在当前工具链中直接构建。正式代码不应直接沿用以下做法:
AsyncTask或旧式线程管理;- 使用普通
SharedPreferences明文保存密码; - 全局允许明文网络流量;
- 未经封装直接调用同步阻塞的 SDK API。
正式实现应通过类型化适配层、后台协程、安全凭据存储和受限网络安全配置接入 ABSDK。
English
This directory archives the original aboxtest Android project as a reference for integrating and calling ABSDK 0630. Only the outer directory name was changed; the original project name, module names, package names, and source layout remain unchanged.
Modules
login-mac: The primary reference module. It demonstrates ABSDK login, password remembering, automatic login, error-code mapping, and socket control.myapplication: An Android Studio sample module included in the original project, containing basic navigation, a login screen, and a SQLite helper skeleton.
Notable files
login-mac/libs/libABSDK0630.jar: The ABSDK 0630 binary dependency.login-mac/src/main/java/tr/dhee/abox/demo/data/LoginDataSource.java: SDK login invocation.login-mac/src/main/java/tr/dhee/abox/demo/data/SwitchDataSource.java: Socket control invocation.login-mac/src/main/java/tr/dhee/abox/demo/ui/login/LoginActivity.java: Login, password remembering, and automatic-login flow.login-mac/src/main/java/tr/dhee/abox/demo/ui/switchcontrol/SwitchControlActivity.java: Socket control UI.login-mac/src/main/java/tr/dhee/abox/demo/utils/AboxConstants.java: ABSDK error-code mapping.
Archive cleanup
The following machine-specific state, build output, and sensitive files were excluded from the archive:
.gradle/,.idea/, and allbuild/directories;local.propertiesand.DS_Store;- APKs, keystores, JKS files, backup files, and the corrupted JAR backup.
Usage limitations
This directory is provided only as a historical implementation and SDK behavior reference. It does not represent the target architecture of ABox Manager and is not guaranteed to build with the current toolchain. Production code should not directly reuse the following practices:
AsyncTaskor legacy thread management;- storing passwords in plain
SharedPreferences; - globally allowing cleartext network traffic;
- calling synchronous, blocking SDK APIs without an adapter.
The production implementation should integrate ABSDK through a typed adapter, background coroutines, secure credential storage, and narrowly scoped network security configuration.