厂商开发指导文档.pdf
- 文人教参个人认证 |
- 2021-10-22 发布|
- 755.34 KB|
- 9页
厂商开发指导文档
1 Launcher 和服务端通信主要流程
2 Launcher 如何获得服务 安装LauncherCustomization.apk,这个apk 后续会在yunos 系统中预装。 通过bindservice 的方式获得。 【示例代码】: Intent intent = new Intent(); intent.setAction(ConfigEntryKeys.SERVICE_DECLARATION); intent.putExtra(ConfigEntryKeys.LAUNCHER_CODE, LAUNCHER_CODE); intent.putExtra(ConfigEntryKeys.PKG_NAME, “com.yunos.tv.xxx”); intent.putExtra(ConfigEntryKeys.PKG_VERSION_CODE, “2012312313”); intent.putExtra(ConfigEntryKeys.PKG_VERSION_NAME, “1.0.2”); intent.putExtra(ConfigEntryKeys.CONFIG_ENTRY_SIZE, ConfigEntryKeys.SIZE_V1); bindService(intent, serviceConnection, Context.BIND_AUTO_CREATE);
其中: ConfigEntryKeys.SERVICE_DECLARATION=com.yunos.tv.IDesktopConfigService 是已经固 定的字段,请勿修改。 ConfigEntryKeys.LAUNCHER_CODE:桌面唯一编码,这个会由阿里PM 分配 ConfigEntryKeys.PKG_NAME:桌面包名 (请上传字符) Config