Exported service does not require permission警告
来源:互联网 发布:数据远传系统 编辑:程序博客网 时间:2024/05/17 16:53
很久没写过应用了,今天写一个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"
- 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
- Delphi-Scrollbar控件的使用方法和详解
- uva10422 - Knights in FEN
- Java对XML的读写操作类
- 开源代码网站
- mysql_fetch_row,mysql_fetch_array,mysql_fetch_assoc的区别
- Exported service does not require permission警告
- 思路重要,先修内功吧
- centos 6.3时间快8小时解决办法
- hdu 1423 Greatest Common Increasing Subsequence (最长上升子序列)
- CSS文本溢出省略号:text-overflow:ellipsis及firefox兼容详解
- log4j配置详解
- 输出成绩
- S3C2440核心板原理图设计:与NAND FLASH接线分析
- 电脑开机出现0×00007B蓝屏代码