[英]Account manager : Android App not appearing under Accounts Tab of Settings,
我正在尝试将我的应用程序设置为“帐户部分”。 因此,当用户点击添加帐户时,我的应用名称可见。 完整的代码可以在这里找到我创建了一个身份验证服务。 这就是我的清单的样子
<service android:name=".AuthenticatorService">
<intent-filter>
<action android:name="android.accounts.AccountAuthenticator" />
</intent-filter>
<meta-data android:name="android.accounts.AccountAuthenticator"
android:resource="@xml/authenticator" />
</service>
我还创建了一个“authenticator.xml”
<?xml version="1.0" encoding="utf-8"?>
<account-authenticator xmlns:android="http://schemas.android.com/apk/res/android"
android:accountType="com.udinic.auth_example"
android:icon="@drawable/ic_launcher"
android:smallIcon="@drawable/ic_launcher"
android:label="testing"
android:accountPreferences="@xml/prefs"/>
但我仍然没有在帐户下看到我的应用程序。 我正在关注本教程,但它不起作用。 你能告诉我我做错了什么吗?
使用资源字符串而不是在标签中使用文字文本。
“authenticator.xml”
android:label="@string/some_label"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.