Hank
Hank

Reputation: 3497

Android Sync Adapter remove add account function from Applications & sync options screen

When I created my application using a sync adapter, I noticed that you can add an account in the "Applications & Sync" menu in Settings. I want my application to have only one account per device, so is there a way to remove my application from that list?

Upvotes: 3

Views: 1745

Answers (1)

Jens
Jens

Reputation: 17077

When you define your sync-adapter you can specify that it is not visible to the user by adding android:userVisible="false" to your XML file - this will exclude it from the settings page.

<sync-adapter xmlns:android="http://schemas.android.com/apk/res/android"
    android:contentAuthority="com.android.contacts"
    android:accountType="com.mycompany.account"
    android:userVisible="false"/>

Upvotes: 2

Related Questions