Contacts FAQ?

by jarkman » Thu, 19 Nov 2009 18:27:28 GMT

Sponsored Links
 GDroid - here's a recipe for supporting two SDK versions in one app:

Contacts FAQ?

by GDroid » Sun, 22 Nov 2009 19:42:19 GMT

 Thanks jarkman. I've continued the discussion in the thread you have

Sponsored Links

Contacts FAQ?

by bcavagnolo » Wed, 09 Dec 2009 06:41:50 GMT

 I've got a question related to #8 "How do I add an Account type, a'la
Facebook, so that I can sync contact data in from MySpace/Livejournal/
whatever."  This seems like the best thread so far to ask it:

My goal is to have the stock android Contacts app create a full
fledged contact with Name, Phone, Email, etc., for my custom account
type.  After some code reading and experimentation, I understand how
programmers are meant to register a new account type, provide a sync
adapter for that account type, and provide an xml CONTACTS_STRUCTURE
for that account type.  I have all of this working, so I am able to
create a new account and add contacts all from the Contacts app.
However, the only editable fields that appear when I create a contact
are "Given name" and "Family name."

A close read of packages/apps/Contacts/src/com/android/contacts/model/ reveals that the EditField and EditTypes info in
CONTACTS_STRUCTURE xml file are not being parsed.  So the fields I
specify in my CONTACTS_STRUCTURE do not appear in the UI.  Will this
functionality be implemented and released in the near term?  ...or am
I missing something?

Also, are there any other sample CONTACTS_STRUCTURE files besides the
comments in



Contacts FAQ?

by Brian Cavagnolo » Thu, 10 Dec 2009 11:28:17 GMT

 ydario: please keep the public discourse public:

You need two meta-data entries: one for the CONTACTS_STRUCTURE and one
for the sync adapter.  Something like this:

                <service android:exported="true"
                        <action android:name="android.content.SyncAdapter"/>
                        <meta-data android:name="android.content.SyncAdapter"

                                android:resource="@xml/contacts" />

See the (limited) sync adapter documentation for details on preparing

Of course the original question still stands: The fields that you
specify in res/xml/contacts.xml don't come up in the contacts app.  It
appears that the code that processes the actual fields is not in
place.  Of course this may not matter for folks who don't wish to use
the stock android Contacts app to edit the custom fields.



Contacts FAQ?

by ydario » Thu, 10 Dec 2009 23:03:31 GMT


ah, I wonder why I didn't do this... maybe being around midnight does
not help ;-)

very limited.

here I think I still have to reach this level. When I open a contact,
here the Contacts Activity stops because it is unable to find an

I tried adding contacts code to this project 

but it still fails because contacts.model.Sources.findAuthenticator
does not work.

I'm using the 2.0.1 emulator, not a real phone, I don't know if this
makes a difference (but account_type is empty on the database).




Contacts FAQ?

by Brian Cavagnolo » Fri, 11 Dec 2009 01:25:49 GMT


When you navigate to Contacts->[menu]->Accounts->AddAccount or
Settings->Accounts & sync->Add Account does your custom account type
appear?  If not, this is probably your next milestone.  I achieved
this by reading the code in packages/apps/Email/, which is a far cry
from a gentle introduction to this stuff.  Also, the actual Account
Settings activity in packages/providers/GoogleSubscribedFeedsProvider/
plays a pivotal role in all of this.  (You'd think that activity would
be in a more prominent place like in the actual Settings app.)

I'm using the head of the public repo, not the SDK.  I'm not sure if
there's any differences.



Contacts FAQ?

by ydario » Fri, 11 Dec 2009 18:57:35 GMT


thanks for pointer.

But here gets my question: if I add an authenticator, the phone will
end having at least two of them, mine and google one.
Will I be able to access also google contacts?
after looking at rawcontacts fields, it seems to me that every account
is tied to one authenticator, so I will not have access to standard

What is your experience regard this?




Contacts FAQ?

by Brian Cavagnolo » Sat, 12 Dec 2009 05:40:23 GMT


Excellent question.  I've been learning the answer the hard way:)
Here's how it works: Suppose I have multiple accounts on my android
device and...

-- ...I try to create a new contact in the contacts app.  What
happens?  The contacts app will ask me under which account the contact
should be created.

-- ...I try to view my contacts in the contacts app.  What happens?
Only the contacts who's accounts are configured to appear under
Contacts->[menu]->Display options will appear.

-- ...I try to add a contact programatically using the
ContactsContract API.  What happens?  This I'm not completely clear
on.  If you use the RAW_CONTACTS uris, I suppose you [must?] specify
the account type and name when you add the contact.  If you use the
CONTACTS uris, a raw contact gets created, but I don't know if the
account fields are populated.  You could try it and dump the db table.
 If you do this experiment, let me know the result!



Contacts FAQ?

by ydario » Sat, 12 Dec 2009 23:31:42 GMT

 Hi Brian,

unfortunately I don't have a 2.0 phone, and the emulator does not have
working authenticators.

yes, nice thought.

And while Contacts are not account aware, RawContacts are. Here it
comes to my mind the aggregation: can a contact aggregate raw accounts
from different types?




Contacts FAQ?

by sazilla » Tue, 15 Dec 2009 19:45:45 GMT

 Hi everyone,

I encountered an issue while configuring my own account for android
contacts sync. When the user choses to add a new contact to the custom
account, only the name fields and the photo are showed. This behaviour
can be found in the android source file.

My question is, if I don't want to add custom contacts fields for my
account, how can I configure the account to show all the standard
fields in the contacts application in the same way the google account

Thank you



Contacts FAQ?

by Jens » Tue, 12 Jan 2010 18:45:58 GMT

 You could check the Email app - its the current location of the
Exchange ActiveSync SyncAdapter implementation. ;a=summary

Note that this adapter isn't the complete story as any contacts you
create with your custom accounts will be next to useless without
looking into the wonky integration required for
custom adapters (unless your happy with contacts that only contains a
name and photo). ;a=tree;f=src/com/android/contacts/model;h=e58985879d5b88e3374b3fad847da3786e47ee94;hb=08d3445a85a65c56c0f09d24f871ffbd3b93187f contains the "super-special-let's-not-use-our-own-API:s-
anything-or-heaven-forbid-test-it" if-statement that determines the
layout of your contacts in the Contacts app - and gives super-special
treatment to accounts with the type "" or
"". contains the sparse and incomplete API
documentation that you're going to have to use.

> start a new project?

Contacts FAQ?

by Jens » Tue, 12 Jan 2010 22:54:55 GMT

 Developing in the SDK you can use the account type "" - this
will trick the Contacts app into displaying all the fields without
trying to use the broken contact field format Brian hinted at earlier
in this thread. This will of course probably not work in an actual
device where the "" authenticator is already added.


> Carlo

Contacts FAQ?

by Berto » Mon, 25 Jan 2010 07:48:05 GMT

 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=" 
        <EditField column="data1" title="@string/sample_string" />

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.


Contacts FAQ?

by Berto » Tue, 26 Jan 2010 00:25:44 GMT

 ust an update for those of you still lost on adding custom accounts,
sync adapters, etc. I found a great article here:

Part 2 was the part I needed (how to render the information you synced
to a contact).



On Jan 22, 4:57pm, Berto <> wrote:


Contacts FAQ?

by HCH » Wed, 03 Feb 2010 10:29:30 GMT

 hanks so much for the link and of course many thanks to the original
poster (Sam Steele). Anyone with android account and syncadapter
questions should read his posts.

My issue now is having the contacts app display and edit the standard
fields (the stuff that lives in CommonDataKinds). I believe it's a
matter of finding the SourceConstraints xml that is used for the null
account or perhaps recreating it by hand.

On Jan 25, 8:25am, Berto <> wrote:


Other Threads

1. Main2 dgn SDK

Nyooookk...modal donlot ajah ama oprek dikit2..
run under windows..

How To :

1. Download Android SDK (which includes the emulator) from
2. Extract sdk ke direktori apa saja (baiknya di D:\Android)
3. Run command prompt, Klik Start - Run, ketik cmd ubah cursor ke 'tools'
directory of the SDK
* Misal SDK tadi di ekstrak ke D:\Android maka di command prompt ketik D: -
enter, then cd Android/tools - enter
4. Ketik '*android create avd -n AndroidGua -t 2*' - Enter2 saja
5. Ketik *mksdcard 1024M sdcard1.iso* - Enter

6. Download
7. Extract file Zip **
9. Copy file *system.img* (dari hasil ekstrak langkah 7) didalam folder *
AndroidGua.avd* directory ('C:\Documents and

and kalo vista biasanya filenya ada di 'C:\Users\<*user*
10. Ketik *emulator -avd AndroidGua -sdcard /android/tools/sdcard1.iso*

Note: inital boot may take a few minutes!

Semua fungsi jalan..Market, Gmail, dll..pake rom cyanogen yg masih Cupcake

kalo mau donut atau eclair mesti pakai system.img donut/eclair juga..
caranya :
1. Flash Rom Donut/Eclair di Android Habdset,
2. Nandroid Backup, ambil file system.img
3. Ketik *android list targets *di command* *prompt, perhatikan result yg
4. Ulangi langkah diatas, saat langkah 4 diatas ubah *-t 2* menjadi angka yg
bersangkutan dgn ID android yg keluar saat step 3..

Ga nyesel dah walau donlot sdknya gede..jiahahahahaha...


Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to

To request to subscribe to this group:


2. Eclair reject incoming call (gprs connected)

Hi all,

If I have a gprs open connection, the eclair subsystem reject my 
incoming call,

is there any good reason?

D/AT      (  876): MUX[primary]: AT< %CPI: 1,7,1,0,1,0,"+39xxxxxx45,,17,0
D/RILJ    (  958): [0082]< DEACTIVATE_DATA_CALL
D/AT      (  876): MUX[primary]: AT< OK
D/RIL     (  876): onRequest: GET_CURRENT_CALLS
D/AT      (  876): MUX[primary]: AT> AT+CLCC
D/RILJ    (  958): [0083]< GET_CURRENT_CALLS  
D/AT      (  876): MUX[primary]: AT< OK
D/RILJ    (  958): [0084]< GET_CURRENT_CALLS  
D/GSM     (  958): [PdpConnection] DataConnection.handleMessage()
D/GSM     (  958): [PdpConnection] Notify PDP disconnect
D/GSM     (  958): [PdpConnection] DataConnection.clearSettings()
D/GSM     (  958): [PdpConnection] PDP Connection Deactivated
D/GSM     (  958): [GsmCallTracker] missed/rejected call, 
D/GSM     (  958): [GsmCallTracker] setting cause to INCOMING_MISSED
D/GSM     (  958): [GSMConn] onDisconnect: cause=INCOMING_MISSED
D/GSM     (  958): [GSMConn] releaseWakeLock


3. Forward search queries to one single activity that handles search

4. create apk with aapt tool

5. Ada yg punya?

6. Streaming Video using VideoView" "Sorry Cant play this video"

7. Streaming Video using VideoView" "Sorry Cant play this video"