Android AccountManager and SyncManager implementation caused only Name field to appear in Add/Edit Contact screen -
we implemented android's account manager , sync manager api create contact sync. when user selects our account while adding contact, displays name fields , other fields disappear.
here have in manifest
<activity android:name=".authenticatoractivity" android:label="ianywhere login" android:theme="@android:style/theme.dialog" android:excludefromrecents="true"></activity> <service android:name=".accounts.authenticationservice"> <intent-filter> <action android:name="android.accounts.accountauthenticator"></action> </intent-filter> <meta-data android:name="android.accounts.accountauthenticator" android:resource="@xml/authenticator"> </meta-data> </service> <service android:name=".accounts.syncservice" android:exported="true"> <intent-filter> <action android:name="android.content.syncadapter" /> </intent-filter> <meta-data android:name="android.content.syncadapter" android:resource="@xml/syncadapter" /> </service>
this have in syncadapter.xml , authenticator.xml
<sync-adapter xmlns:android="http://schemas.android.com/apk/res/android" android:contentauthority="com.android.contacts" android:accounttype="com.rahul.utility.contacts" />
have seen people talk kind of issue while adding custom fields bug in contact application. checked out code of exchange email client in android source code , seems doing same did, still when select add contact exchange account shows fields in contact.
after lot of research , looking android code base found android checks account type either of google or default rendering fields. if account type of other type, displays basic 2 fields. there no work around apart creating own contact add / edit screen (sad! really).
there possibility android have provided interface others return field types wanted on screen not implemented way of now.
Comments
Post a Comment