Hi ,
In android2.1 contacts app no provision to edit other fields
except name and photo details for custom sync accounts.It may
intentional in android 2.1 contacts b'coz in ExternalSource.java
inflate photo and name is adding by "new DataKind(String mimeType,
int titleRes, int iconRes, int weight, boolean editable) "
constructor where editable is passing true, and for contacts.xml
DataKind is adding by default constructor therefore in that case
editable default is false and in ContactEditorView.java "if (!
kind.editable) continue;" will skip add the edit view for custom
Datakind. In case of GmailSource and ExchangeSource all datakind are
adding by the "new DataKind(String mimeType, int titleRes, int
iconRes, int weight, boolean editable) " constructor by passing
editable as true.
Please let us know if anybody found solution for this. Any
help would be highly appreciated.
On Mar 15, 5:53 pm, Berto <[email protected]> wrote:
> Could be intentional. If it is intentional, it's quite the
> oversight. Although, IIRC, it was coded up, but the code will never
> be reached. Can't remember for sure though.
>
> On Mar 11, 12:36 pm, Jens <[email protected]> wrote:
>
> > Bug or intentional?
>
> > On 3 mar, 20:31, HCH <[email protected]> wrote:
>
> > > From my reading of the sources (2.1) acustomaccount contact is not
> > > editable on the phone outside of the name fields.
>
> > > The contact editor does not read the relevant information out of the
> > > contacts.xml. It only reads enough to support what you'd see in the
> > > Facebook type account.
>
> > > The source fix would likely be trivial: just use the fallback source
> > > mapping as the baseline.
>
> > > On Feb 26, 12:49 am, sazilla <[email protected]> wrote:
>
> > > > Hi Berto,
>
> > > > do you managed to render the contacts edit fields from acustom
> > > > account using the native contacts app? or for contacts view only?
>
> > > > thanks
> > > > Carlo
>
> > > > On 25 Gen, 17:25, Berto <[email protected]> wrote:
>
> > > > > Just an update for those of you still lost on addingcustomaccounts,
> > > > > sync adapters, etc. I found a great article here:
>
> > > > >http://www.c99.org/2010/01/23/writing-an-android-sync-provider-part-1...
>
> > > > > Part 2 was the part I needed (how to render the information you synced
> > > > > to a contact).
>
> > > > > HTH,
>
> > > > > Berto
>
> > > > > On Jan 22, 4:57 pm, Berto <[email protected]> wrote:
>
> > > > > > So, it turns out that anything you put into your own ExternalSource
> > > > > > will never get parsed and therefore (theoretically) never show up.
> > > > > > Or
> > > > > > am I doing something wrong? The code looks like it will parse only
> > > > > > the information in ContactsDataKind and not the EditField node from
> > > > > > the following:
>
> > > > > > <ContactsSource xmlns:android="http://schemas.android.com/apk/res/
> > > > > > android">
> > > > > > <ContactsDataKind
> > > > > > android:mimeType="com.example.mimetype"
> > > > > > android:icon="@drawable/icon"
> > > > > > android:summaryColumn="data2"
> > > > > > android:detailColumn="data3">
> > > > > > <EditField column="data1" title="@string/sample_string" />
> > > > > > </ContactsDataKind>
> > > > > > </ContactsSource>
>
> > > > > > Essentially, I have adding an account and the sync adapter working.
> > > > > > But when I try to create a new contact through the contacts app, I
> > > > > > can
> > > > > > never see any of the fields I added in the XML structure defined by
> > > > > > "<meta-data android:name="android.provider.CONTACTS_STRUCTURE"
> > > > > > android:resource="@xml/contacts" />". Has anyone figured out an
> > > > > > answer to this problem yet? I've seen a few posts, but nothing
> > > > > > with a
> > > > > > solid answer.
>
> > > > > > On Jan 12, 4:45 am, Jens <[email protected]> wrote:
>
> > > > > > > You could check the Email app - its the current location of the
> > > > > > > Exchange ActiveSync SyncAdapter implementation.
>
> > > > > > >http://android.git.kernel.org/?p=platform/packages/apps/Email.git;a=s...
>
> > > > > > > Note that this adapter isn't the complete story as any contacts
> > > > > > > you
> > > > > > > create with yourcustomaccountswill be next to useless without
> > > > > > > looking into the wonky ExternalSource.java integration required
> > > > > > > for
> > > > > > >customadapters (unless your happy with contacts that only contains
> > > > > > >a
> > > > > > > name and photo).
>
> > > > > > >http://android.git.kernel.org/?p=platform/packages/apps/Contacts.git;...
>
> > > > > > > Sources.java contains the
> > > > > > > "super-special-let's-not-use-our-own-API:s-
> > > > > > > because-that's-hard-work-and-might-require-us-to-actually-document-
> > > > > > > anything-or-heaven-forbid-test-it" if-statement that determines
> > > > > > > the
> > > > > > > layout of your contacts in the Contacts app - and gives
> > > > > > > super-special
> > > > > > > treatment toaccountswith the type "com.google" or
> > > > > > > "com.android.exchange".
>
> > > > > > > ExternalSource.java contains the sparse and incomplete API
> > > > > > > documentation that you're going to have to use.
>
> > > > > > > On 9 Jan, 22:16, joebowbeer <[email protected]> wrote:
>
> > > > > > > > On Dec 10 2009, 7:03 am, ydario <[email protected]> wrote:
>
> > > > > > > > > I tried addingcontactscode to this project
>
> > > > > > > > >http://code.google.com/p/androidaccounts/
>
> > > > > > > > The referenced project no longer exists. Are there any similar
> > > > > > > > projects to check out? If not, could someone who has a handle
> > > > > > > > on this
> > > > > > > > start anewproject?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
To unsubscribe, reply using "remove me" as the subject.