2013-02-15 51 views
3

我正在开发一个包含多个组件的应用程序,每个组件都将是一个单独的Android应用程序。 “核心”应用程序将使用内容提供商提供对数据库的访问权限,并且阅读权限文档“签名”保护是我想要的方式。Android权限,签名和开发人员密钥

我已经为我的权限定义了一个组,主要是我的权限在应用程序信息的“权限”部分中会很好地显示出我自己的图标。与android:protectionLevel="normal"他们表现得很好。但是当我使用android:protectionLevel="signature"时,它们消失了。

<permission-group 
    android:name="com.example.permissions.GROUP" 
    android:label="@string/lblGroup" 
    android:description="@string/descGroup" 
    android:icon="@drawable/ic_menu_permissions_group" /> 

<permission 
    android:name="com.example.permission.CONFIG_READ" 
    android:permissionGroup="com.example.permissions.GROUP" 
    android:protectionLevel="signature" 
    android:label="@string/lblConfigRead" 
    android:description="@string/descConfigRead" /> 
<permission 
    android:name="com.example.permission.CONFIG_WRITE" 
    android:permissionGroup="com.example.permissions.GROUP" 
    android:protectionLevel="signature" 
    android:label="@string/lblConfigWrite" 
    android:description="@string/descConfigWrite" /> 

鉴于我目前正在开发,因此使用开发者极为重要,还有一些其他的篮球,我需要为了得到“签名”保护级别为开发商合作,通过跳?

一如往常许多感谢您的帮助

史蒂夫

回答

3

但是,当我使用android:=的ProtectionLevel “签名”,他们消失。

这是因为用户不需要批准它们。签名级权限会根据应用的签名自动授予和拒绝。

是否还有其他一些箍环我需要跳过以获得“签名”保护级别以便开发人员使用?

它已经适用于您自己的应用程序。如果“开发者”是第三方,则不能使用签名级权限,因为他们将使用自己的签名密钥进行签名。

+0

谢谢CW。在逐步建立权限的过程中,我从“正常”切换到“签名”作为错误。 :-) – Dobbo 2013-02-15 16:06:18

相关问题