Android5.0配置说明
因Android L(android 5.0)系统自身限制,多个应用安装时,如果拥有同一个Service权限,会导致权限冲突,只能安装一个带有此权限的应用,其他应用都不能再安装上去。
目前有许多客户在Android 5.0系统上接入个推SDK时,会发现如果其他集成个推SDK的应用已经安装在手机,此应用就不能再安装上去,会出现权限冲突。
报错信息如下:
[INSTALL_FAILED_DUPLICATE_PERMISSIONperm=getui.permission.GetuiServicepkg
=com.XXX.XXXXX](因客户包名,所以省略)
官方说明:
Starting in Android 5.0, the system enforces a new uniqueness restriction on custom permissions for apps that are signed with different keys. Now only one app on a device can define a given custom permission (as determined by its name), unless the other app defining the permission is signed with the same key. If the user tries to install an app with a duplicate custom permission and is not signed with the same key as the resident app that defines the permission, the system blocks the installation.
对此,个推SDK对权限配置做了修改,修改了一下自定义权限的名称,如下,是需要修改的地方:
在原来的名称后加上应用的包名即可。
http://docs.getui.com/pages/viewpage.action?pageId=1213292