Exported service does not require permission警告
来源:互联网 发布:数据结构算法pdf百度云 编辑:程序博客网 时间:2024/06/15 03:48
很久没写过应用了,今天写一个Service时,在manifest文件的<service>标签发现了这个警告
- <service
- android:name="SendService">
- <intent-filter>
- <action android:name="com.oem.OEMSendService.SENDMAIL" />
- </intent-filter>
- </service>
查了下api,终于发现一些端倪
原因:这是一个可以被外部访问的service,需要使用权限来限制外部访问
解决方法:
1.添加
android:exported="false
"
这种方法是限制外部访问,自然不需要权限了
2.声明权限
先在<manifest>标签下加入
<permission android:protectionLevel="normal" android:name="oem.permission.SENDMAIL"></permission>
然后在<service>标签下
android:permission="oem.permission.SENDMAIL"
0 0
- Exported service does not require permission警告
- Exported service does not require permission警告
- Exported service does not require permission警告
- Exported service does not require permission警告
- Exported service does not require permission警告
- Exported service does not require permission警告
- Exported service does not require permission警告
- Exported service does not require permission警告
- Exported service does not require permission警告
- Exported service does not require permission警告
- Exported service does not require permission警告
- Exported service does not require permission警告
- Exported service does not require permission警告
- Exported service does not require permission警告
- Exported service does not require permission警告
- Exported service does not require permission警告
- Android Exported service does not require permission警告
- Exported service does not require permission
- oracle中的exists 和not&nbsp…
- SQL查询重复记录
- Bean的生命周期
- Spring中Bean的生命周期
- oracle中distinct和count函数组合…
- Exported service does not require permission警告
- java获取客户端真实IP地址
- weblogic.xml在项目中设置的…
- HDU 3037 Saving Beans(lucas定理)
- 数据库设计原则
- VC6.0开发工具常用快捷键大全
- eclipse与Zend studio样式修改
- java操作保存图片到oracle数据库及…
- SpringMVC运行流程分析