在Android应用中使用Trust Agents

在Android应用中使用Trust Agents,第1张

概述我正在尝试使用最近添加的TrustAgent.由官方Androidsources关于Git的评论所做的清单.正如在实现这样的清单之后所说的那样,我将能够从TrustAgentService扩展类.而已:<uses-permissionandroid:name="android.permission.CONTROL_KEYGUARD"/><uses-permissionandroid:name="a

我正在尝试使用最近添加的TrustAgent.
由官方Android sources关于Git的评论所做的清单.正如在实现这样的清单之后所说的那样,我将能够从TrustAgentService扩展类.

而已:

<uses-permission androID:name="androID.permission.CONTRol_KEyguard" /><uses-permission androID:name="androID.permission.PROVIDE_TRUST_AGENT" /><application    androID:allowBackup="true"    androID:icon="@mipmap/ic_launcher"    androID:label="@string/app_name"    androID:theme="@style/Apptheme" >    <service androID:exported="true"             androID:label="@string/app_name"             androID:name=".CustomTrustAgent"             androID:permission="androID.permission.BIND_TRUST_AGENT">        <intent-filter>            <action androID:name="androID.service.trust.TrustAgentService" />            <category androID:name="androID.intent.category.DEFAulT" />        </intent-filter>        <Meta-data androID:name="androID.service.trust.trustagent"                   androID:value="@xml/trust_agent" />    </service>    <activity        androID:name=".MainActivity"        androID:label="@string/app_name" >        <intent-filter>            <action androID:name="androID.intent.action.MAIN" />            <category androID:name="androID.intent.category.LAUNCHER" />        </intent-filter>    </activity></application>

但我仍然无法从TrustAgentService扩展.使用API​​ 22. SDK已更新至最新版本.

解决方法:

不幸的是你不能使用这些API ..我也不是..

您无法直接继承TrustAgentService的原因是它被@SystemAPI注释从SDK jar中隐藏.

此外,androID.permission.BIND_TRUST_AGENT需要具有签名权限.

总结

以上是内存溢出为你收集整理的在Android应用中使用Trust Agents全部内容,希望文章能够帮你解决在Android应用中使用Trust Agents所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1114975.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存