Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Account manager : Android App not appearing under Accounts Tab of Settings,

I am trying to dd my application the "Accounts Section" of the settings. So that when the user clicks on Add account , my app name is visible. The complete code can be found here I have created an authenticator service. This is how my manifest looks like

<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>

I also created an "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"/>

But still I dont see my app under accounts. I am following this tutorial but its not working. Can you tell me what am I doing wrong ?

like image 592
Abhik Avatar asked Nov 22 '15 07:11

Abhik


1 Answers

Use a resource string instead of using literal text in label.

"authenticator.xml"

android:label="@string/some_label"
like image 109
Rodrigo Dias Avatar answered Nov 15 '22 03:11

Rodrigo Dias