导出的服务不需要的权限:这是什么意思? [英] Exported service does not require permission: what does it mean?

查看:193
本文介绍了导出的服务不需要的权限:这是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建通过AIDL受其他应用程序的服务,并且我将其添加到清单如下:

I created a service that is bound by other applications through AIDL, and I add it to the manifest as follows:

<service android:name=".MyService">
    <intent-filter>
        <action android:name="org.example.android.myservicedemo.IService" />
    </intent-filter>
</service>

在这里IService是AIDL接口。

where IService is the AIDL interface.

在这种方式时,Eclipse显示我的警告的导出服务并不需要许可的。如果我删除意图过滤器,报警消失了,但很明显的应用程序无法绑定到该服务。

In this way, Eclipse show me the warning Exported service does not require permission. If I remove the intent-filter, the warning disappear, but obviously the applications are unable to bind to the service.

这是什么警示呢?

推荐答案

我有同样的问题,当我的更新的SDK 以版本的 20 。我删除它加入机器人:出口属性安卓出口=假像这样:

I had the same issue when I updated SDK to version 20. I removed it adding android:exported property android:exported="false" like so:

<service android:name=".MyService"
    android:exported="false">
    <intent-filter>
        <action android:name="org.example.android.myservicedemo.IService" />
    </intent-filter>
</service>

请参阅此文档

这篇关于导出的服务不需要的权限:这是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆