So it turns out you can have a syncAdapter that uses a "com.google" account, but this requires you write a matching ContentProvider. For example, in AndroidManifest.xml:
<service android:name=".sync.SyncAdapterService" android:exported="true" android:process=":contacts">
<intent-filter>
<action android:name="android.content.SyncAdapter" />
</intent-filter>
<meta-data android:name="android.content.SyncAdapter" android:resource="@xml/syncadapter" />
</service>
and in syncadapter.xml:
<?xml version="1.0" encoding="utf-8"?>
<sync-adapter xmlns:android="http://schemas.android.com/apk/res/android"
android:contentAuthority="net.gfxmonk.android.pagefeed"
android:accountType="com.google"
android:supportsUploading="false"
android:userVisible="true"
/>
You then must have a ContentProvider with authority "net.gfxmonk.android.pagefeed" in order for android to associate that sync action with your application. Once you have this (it doesn't even need to do anything meaningful, just exist), your program can appear inside the "accounts & Sync" setting panel - within your chosen google account.
As an additional piece of work, you may need to call:
ContentResolver.setIsSyncable(account, "net.gfxmonk.android.pagefeed", 1)
with account as the Account object you want to use for your sync credentials.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…