当前位置: 首页 > news >正文

应用插件化及其进程关系梳理

 插件应用的AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"coreApp="true"package="com.demo.phone"android:sharedUserId="android.uid.phone"><uses-sdk android:minSdkVersion="28" /><uses-permission android:name="android.permission.POST_NOTIFICATIONS"/><applicationandroid:defaultToDeviceProtectedStorage="true"android:directBootAware="true"android:label="@string/phone_label"android:process="com.android.phone"android:supportsRtl="true"android:theme="@style/Theme.Settings"><activity android:name="com.demo.MainActivity"android:exported="true"><intent-filter><action android:name="android.intent.action.MAIN" /></intent-filter></activity><!-- 定义插件接口PhonePlugin,并且插件在清单列表中声明为 Service --><!-- Must declare plugin as Service,the action should the same as IPluginTest.action(stay consistent) --><service android:name="com.demo.phone.PhonePlugin"android:exported="true"><intent-filter><action android:name="com.demo.plugin.phone"/></intent-filter></service><activity android:name="com.demo.phone.PhoneActivity"android:label="@string/phone_settings"android:exported="true"android:configChanges="orientation|keyboardHidden|screenSize"><intent-filter><action android:name="android.intent.action.MAIN" /><category android:name="android.intent.category.DEFAULT" /></intent-filter><intent-filter android:priority="1"><action android:name="android.settings.PHONE_SETTINGS" /> <!--这个自定义或者用原生的--><category android:name="android.intent.category.DEFAULT" /></intent-filter><intent-filter><action android:name="android.intent.action.MAIN" /><category android:name="android.intent.category.DEFAULT" /><category android:name="android.intent.category.VOICE_LAUNCH" /></intent-filter></activity>

说明运行在Phone进程(待优化)

android:sharedUserId="android.uid.phone"

android:process="com.android.phone" 

http://www.lryc.cn/news/479294.html

相关文章:

  • Odoo:免费开源的医药流通行业信息化解决方案
  • 系统架构设计师论文:大数据Lambda架构
  • 亚信安全新一代WAF:抵御勒索攻击的坚固防线
  • Flutter 中的那些设计模式的写法(持续更新)
  • 【提效工具开发】Python功能模块执行和 SQL 执行 需求整理
  • Linux系列-进程的状态
  • SpringBoot项目中常用的一些注解
  • 【网络】自定义协议——序列化和反序列化
  • Pytorch如何精准记录函数运行时间
  • 使用 Java 实现邮件发送功能
  • html第一个网页
  • 前后端交互接口(三)
  • 华为Mate70前瞻,鸿蒙NEXT正式版蓄势待发,国产系统迎来关键一战
  • 【安卓13 源码】Input子系统(4)- InputReader 数据处理
  • Xserver v1.4.2发布,支持自动重载 nginx 配置
  • Java反射原理及其性能优化
  • RabbitMQ 管理平台(控制中心)的介绍
  • 【SQL】在 SQL Server 中创建数据源是 MySQL 数据表的视图
  • 现代Web开发:Next.js 深度解析与最佳实践
  • LeetCode题练习与总结:赎金信--383
  • eval: jdk1.8.0_431/jre/bin/java: Permission denied
  • .Net IOC理解及代码实现
  • 履带机器人(一、STM32控制部分--标准库)
  • 地理空间-Java实现航迹稀释
  • qt QHttpMultiPart详解
  • 【测试】【Debug】vscode中同一个测试用例出现重复
  • Mac上的免费压缩软件-FastZip使用体验实测
  • Linux(CentOS)运行 jar 包
  • 基于YOLOv8 Web的安全帽佩戴识别检测系统的研究和设计,数据集+训练结果+Web源码
  • LabVIEW VISA通信常见问题