English 中文(简体)
氯胺乙胺
原标题:Android SyncAdapter using a google account

我写了一张带有“com.google”账户的SyncAdapter,并用一台 app网服务。 与“发展中国家”一道测试这种工具,该辛迪加似乎只是罚款。

问题在于,它不会因违约而分裂。 转到“账户和账单”账户的账面显示,我的直角账户是空白的,如没有星号服务。

我怀疑,为了在“账户和账单;辛迪加”菜单中显示我的辛迪,我需要执行我自己的会计分析员,该分析员将做与我所认为的 go角会计分析师已经做的同样的事情。 这不是令人振奋的工作,似乎没有必要。 因此:

  • is there a way to add an entry to the "accounts & sync" menu that uses my SyncAdapter but relies on a google account? or to add a sub-menu to google accounts that enables sync of my appengine service?

如果不是,

  • is there a way I can re-use google s AccountAuthenticator from within an AccountAuthenticator I write?
最佳回答

因此,你可以有一个使用“com.google”账户的合成Adapter,但这要求你写一个相应的内容提供者。 例如,在安妮凡斯特,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>

和辛卡达普特: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"
/>

接着,must 有一个内容提供人,有权“net.gfxmonk.android.pagefeed”,以便使该辛迪行动与你的申请联系起来。 一旦你们有这种(甚至不需要做任何有意义的事情,只要存在的话,你的方案就可在“账户和计划”;Sync”小组内——在你选定的视角范围内。

作为一项额外工作,你可能需要呼吁:

ContentResolver.setIsSyncable(account, "net.gfxmonk.android.pagefeed", 1)

记为账户反对者,请您代为代表。

问题回答

暂无回答




相关问题
ajax login using httpRequest?

I am trying to develop my login script to give feedback to the user if the login is valid or not. Basically if it isn t correct a div box will show saying its wrong, if its correct it will show its ...

Remotely authenticating client Windows user on demand

Suppose I am writing a server for a particular network protocol. If I know that the client is running on a Windows machine, is it possible for my server to authenticate the Windows user that owns the ...

Role/Permission based forms authorizing/authentication?

While looking into forms authorizing/authentication, I found that it is possible to do role based authorizing by adding an array of roles to a FormsAuthenticationTicket. That way I can write User....

热门标签