Re: [android-developers] [Android 2.0] Contacts FAQ?

2009-11-13 Thread Rachel Blackman
Bah.  List got truncated.
-

1) How do I just get ALL the contacts under the 2.0 API?

  * I already posted an example of this, and I can readily turn something like 
that into a simple compilable project.

2) Given a contact, how do I get all the phone numbers?

  * Ditto above.

3) Given a contact, how do I get all the email addresses?

  * Ditto above, save that for some reason my copy of Eclipse claims that the 
ContactsContract.CommonDataKinds.CommonColumns class does not exist.  So my 
little sample from the other day doesn't compile for me, though replacing 
ContactsContract.CommonDataKinds.CommonColumns.DATA with just "data1" makes 
everything work fine.  (Now I wonder if this is a problem in my install of the 
SDK, or if I misread the docs. Hrm.)

4) What sort of identifier should I represent a contact with in my local data, 
so I can later get their most-current data?

  * There was a thread about this on the mailing list, which someone could 
probably boil down into a sample

5) How do I set a contact photo?

  * There were SEVERAL threads on this on the mailing list, which could 
probably boil down into a sample.

6) How do I add a contact to the address book from within an app?

  * There's been at least one vague thread on this, which... maybe can be a 
sample?

7) How do I work with groups? (Create a group, delete a group, get or alter 
group membership.)

  * I don't think there's been a good answer to this.

8) How do I add custom data to a contact?

  * I don't think there's been a clear answer to this.

9) How do I /get/ the nifty status messages and the source for them (a'la 'Away 
for lunch' on 'Google Talk,' or 'eating a pie!' on 'Facebook'), so I can 
display them alongside a contact in my own app? (Alternatively, some ask how 
they can set the nifty status messages and have them appear in the QuickContact 
bar or in other apps.)

  * I /definitely/ don't think there's been a clear answer to this.

10) How do I add an action to the QuickContact bar for a contact?

  * .../or/ this.

11) How do I add an Account type, a'la Facebook, so that I can sync contact 
data in from MySpace/Livejournal/whatever.

  * This one, Dan seems to have taken on.  Kudos to him!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] [Android 2.0] Contacts FAQ?

2009-11-13 Thread Rachel Blackman

On Nov 13, 2009, at 6:57 PM, Yao wrote:

> Another important thing is that are new contact APIs stable and public? Will 
> they be changed in the next release?
> 
> I've been seeing "this is a private method" many times. Contacts APIs were 
> very stable before, but this time, new APIs  is a big change without any 
> document...

Decent question.

Okay, so the current list of Contacts Questions For a FAQ/Samples as far as I 
can tell is as follows. If anyone's interested in taking on one of them and 
writing up a sample to contribute, chime in?  And as noted above, we probably 
should make sure whatever we figure out for any of these things is /guaranteed/ 
public, supported API, not private API that just ended up in the Javadocs or 
whatever.

---

1) How do I just get ALL the contacts under the 2.0 API?

  * I already posted an example of this, and I can readily turn something like 
that into a simple compilable project.

2) Given a contact, how do I get all the phone numbers?

  * Ditto above.

3) Given a contact, how do I get all the email addresses?

  * Ditto above, save that for some reason my copy of Eclipse claims that the 
ContactsContract.CommonDataKinds.CommonColumns class does not exist.  So my 
little sample from the other day doesn't compile for me, though replacing 
ContactsContract.CommonDataKinds.CommonColumns.DATA with just "data1" makes 
everything work fine.  (Now I wonder if this is a problem in my install of the 
SDK, or if I misread the docs. Hrm.)

4) What sort of identifier should I represent a contact with in my local data, 
so I can later get their most-current data?

  * There was a thread about this on the mailing list, which someone could 
probably boil down into a sample

5) How do I set a contact photo?

  * There were SEVERAL threads on this on the mailing list, which could 
probably boil down into a sample.

6) How do I add a contact to the address book from within an app?

  * There's been at least one vague thread on this, which... maybe can be a 
sample?

7) How do I work with groups? (Create a group, delete a group, get or alter 
group membership.)

  * I don't think there's been a good answer to this.

8) How do I add custom data to a contact?

  * I don't think there's been a clear answer to this.

9) How do I /get/ the nifty status messages and the source for them (a'la 'Away 
for lunch' on 'Google Talk,' or 'eating a pie!' on 'Facebook'), so I can 
display them alongside a contact in my own app? (Alternatively, some ask how 
they can set the nifty status messages and have them appear in the QuickContact 
bar or in other apps.)

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] [Android 2.0] Contacts FAQ?

2009-11-13 Thread Yao
Another important thing is that are new contact APIs stable and public? Will
they be changed in the next release?

I've been seeing "this is a private method" many times. Contacts APIs were
very stable before, but this time, new APIs  is a big change without any
document...

On Sat, Nov 14, 2009 at 10:38 AM, Dan Dumont  wrote:

> To facilitate the discussion around #8, (android.accounts examples) I've
> started up a project over here:
> http://code.google.com/p/androidaccounts/
>
>  If anyone is interested in
> pitching in and writing some examples, let me know so I can add you.
> The current state of the project is as far as I've gotten to understanding
> what is available so far... and I'm stumped as to why new accounts don't
> seem to persist after their creation ( as far as the AccountsTester app is
> concerned ).
>
> On Fri, Nov 13, 2009 at 8:49 PM, Yao  wrote:
>
>> Agreed! Some more questions, thanks!
>>
>> 11) How do I get add/delete/update a group?
>> 12) How do I get members of a group?
>> 13) How do I add a contact to a group?
>> 14) How do I remove a contact from a group?
>>
>>
>> On Sat, Nov 14, 2009 at 8:21 AM, Rachel Blackman <
>> ceruleanspa...@gmail.com> wrote:
>>
>>> So, judging from list traffic, there's... confusion, let's say,
>>> surrounding the Android 2.0 ContactsContract API.  Some parts of the new API
>>> are fairly straightforward, others?  Not so much.
>>>
>>> Look at the threads about "How do I set a contact photo?" or "How do I
>>> create a new contact under 2.0, from within my app?" (which, of course,
>>> leads into the whole Accounts thing) or "What do I store as a single,
>>> consistent value to tie data in my app to a contact, now?  What's the
>>> reliable key into that data?" or "OMG WTF WHERE ARE THE PHONE NUMBERS?  I
>>> THINK LITTLE PHONE GOBLINS ATE THEM!" or so on.
>>>
>>> (Well, maybe not the last one.)
>>>
>>> Some of the questions seem to occur over and over again.  "I *still*
>>> can't set contact photos!" "Can someone show me how to get the phone numbers
>>> for a contact, hungry goblins notwithstanding?"  Etc.  I therefore suggest
>>> that these qualify as FAQs.
>>>
>>> So, I'm going to suggest we as a community put together a quick list of
>>> Common Contact Operations (or Ones People Are Likely To Want), and put
>>> together some simple little tutorials which can be dumped somewhere on
>>> GoogleCode.
>>>
>>> The questions I see occurring a lot on a couple of web searches are:
>>>
>>> 1) How do I just get ALL the contacts under the 2.0 API?
>>>
>>> 2) Given a contact, how do I get all the phone numbers?
>>>
>>> 3) Given a contact, how do I get all the email addresses?
>>>
>>> 4) What sort of identifier should I represent a contact with in my local
>>> data, so I can later get their most-current data?
>>>
>>> 5) How do I set a contact photo?
>>>
>>> 6) How do I add a contact to the address book from within an app?
>>>
>>> 7) How do I add custom data to a contact?
>>>
>>> 8) How do I add an Account type, a'la Facebook, so that I can sync
>>> contact data in from MySpace/Livejournal/whatever.
>>>
>>> 9) How do I /get/ the nifty status messages and the source for them (a'la
>>> 'Away for lunch' on 'Google Talk,' or 'eating a pie!' on 'Facebook'), so I
>>> can display them alongside a contact in my own app?  (Alternatively, some
>>> ask how they can set the nifty status messages and have them appear in the
>>> QuickContact bar or in other apps.)
>>>
>>> 10) How do I add an action to the QuickContact bar for a contact?
>>>
>>> 1-7 seem to be the most-often-asked questions, but I've seen 8-10 around
>>> as well.  Does anyone else think that this would be worth putting together
>>> as a little reference and set of samples for 2.0?  Would anyone else be
>>> willing to pitch in and write one or two of the samples?  I figure, each of
>>> the items could be tackled as a short write-up individually (and I'll
>>> certainly do some as well, since I'm the one proposing this).  Maybe we can
>>> even get one or two of the Google folks to look at the samples when done and
>>> confirm that the methods used /are/ the best-practice ones. :)
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>
>>
>>
>>
>> --
>> Best regards,
>> MTM
>> Contacts GroupU - Group your Android Contacts
>> http://contacts-groupu.appspot.com
>>
>>  --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@google

Re: [android-developers] [Android 2.0] Contacts FAQ?

2009-11-13 Thread Dan Dumont
To facilitate the discussion around #8, (android.accounts examples) I've
started up a project over here:
http://code.google.com/p/androidaccounts/

If anyone is interested in
pitching in and writing some examples, let me know so I can add you.
The current state of the project is as far as I've gotten to understanding
what is available so far... and I'm stumped as to why new accounts don't
seem to persist after their creation ( as far as the AccountsTester app is
concerned ).

On Fri, Nov 13, 2009 at 8:49 PM, Yao  wrote:

> Agreed! Some more questions, thanks!
>
> 11) How do I get add/delete/update a group?
> 12) How do I get members of a group?
> 13) How do I add a contact to a group?
> 14) How do I remove a contact from a group?
>
>
> On Sat, Nov 14, 2009 at 8:21 AM, Rachel Blackman  > wrote:
>
>> So, judging from list traffic, there's... confusion, let's say,
>> surrounding the Android 2.0 ContactsContract API.  Some parts of the new API
>> are fairly straightforward, others?  Not so much.
>>
>> Look at the threads about "How do I set a contact photo?" or "How do I
>> create a new contact under 2.0, from within my app?" (which, of course,
>> leads into the whole Accounts thing) or "What do I store as a single,
>> consistent value to tie data in my app to a contact, now?  What's the
>> reliable key into that data?" or "OMG WTF WHERE ARE THE PHONE NUMBERS?  I
>> THINK LITTLE PHONE GOBLINS ATE THEM!" or so on.
>>
>> (Well, maybe not the last one.)
>>
>> Some of the questions seem to occur over and over again.  "I *still* can't
>> set contact photos!" "Can someone show me how to get the phone numbers for a
>> contact, hungry goblins notwithstanding?"  Etc.  I therefore suggest that
>> these qualify as FAQs.
>>
>> So, I'm going to suggest we as a community put together a quick list of
>> Common Contact Operations (or Ones People Are Likely To Want), and put
>> together some simple little tutorials which can be dumped somewhere on
>> GoogleCode.
>>
>> The questions I see occurring a lot on a couple of web searches are:
>>
>> 1) How do I just get ALL the contacts under the 2.0 API?
>>
>> 2) Given a contact, how do I get all the phone numbers?
>>
>> 3) Given a contact, how do I get all the email addresses?
>>
>> 4) What sort of identifier should I represent a contact with in my local
>> data, so I can later get their most-current data?
>>
>> 5) How do I set a contact photo?
>>
>> 6) How do I add a contact to the address book from within an app?
>>
>> 7) How do I add custom data to a contact?
>>
>> 8) How do I add an Account type, a'la Facebook, so that I can sync contact
>> data in from MySpace/Livejournal/whatever.
>>
>> 9) How do I /get/ the nifty status messages and the source for them (a'la
>> 'Away for lunch' on 'Google Talk,' or 'eating a pie!' on 'Facebook'), so I
>> can display them alongside a contact in my own app?  (Alternatively, some
>> ask how they can set the nifty status messages and have them appear in the
>> QuickContact bar or in other apps.)
>>
>> 10) How do I add an action to the QuickContact bar for a contact?
>>
>> 1-7 seem to be the most-often-asked questions, but I've seen 8-10 around
>> as well.  Does anyone else think that this would be worth putting together
>> as a little reference and set of samples for 2.0?  Would anyone else be
>> willing to pitch in and write one or two of the samples?  I figure, each of
>> the items could be tackled as a short write-up individually (and I'll
>> certainly do some as well, since I'm the one proposing this).  Maybe we can
>> even get one or two of the Google folks to look at the samples when done and
>> confirm that the methods used /are/ the best-practice ones. :)
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>
>
> --
> Best regards,
> MTM
> Contacts GroupU - Group your Android Contacts
> http://contacts-groupu.appspot.com
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=

Re: [android-developers] [Android 2.0] Contacts FAQ?

2009-11-13 Thread Yao
Agreed! Some more questions, thanks!

11) How do I get add/delete/update a group?
12) How do I get members of a group?
13) How do I add a contact to a group?
14) How do I remove a contact from a group?

On Sat, Nov 14, 2009 at 8:21 AM, Rachel Blackman
wrote:

> So, judging from list traffic, there's... confusion, let's say, surrounding
> the Android 2.0 ContactsContract API.  Some parts of the new API are fairly
> straightforward, others?  Not so much.
>
> Look at the threads about "How do I set a contact photo?" or "How do I
> create a new contact under 2.0, from within my app?" (which, of course,
> leads into the whole Accounts thing) or "What do I store as a single,
> consistent value to tie data in my app to a contact, now?  What's the
> reliable key into that data?" or "OMG WTF WHERE ARE THE PHONE NUMBERS?  I
> THINK LITTLE PHONE GOBLINS ATE THEM!" or so on.
>
> (Well, maybe not the last one.)
>
> Some of the questions seem to occur over and over again.  "I *still* can't
> set contact photos!" "Can someone show me how to get the phone numbers for a
> contact, hungry goblins notwithstanding?"  Etc.  I therefore suggest that
> these qualify as FAQs.
>
> So, I'm going to suggest we as a community put together a quick list of
> Common Contact Operations (or Ones People Are Likely To Want), and put
> together some simple little tutorials which can be dumped somewhere on
> GoogleCode.
>
> The questions I see occurring a lot on a couple of web searches are:
>
> 1) How do I just get ALL the contacts under the 2.0 API?
>
> 2) Given a contact, how do I get all the phone numbers?
>
> 3) Given a contact, how do I get all the email addresses?
>
> 4) What sort of identifier should I represent a contact with in my local
> data, so I can later get their most-current data?
>
> 5) How do I set a contact photo?
>
> 6) How do I add a contact to the address book from within an app?
>
> 7) How do I add custom data to a contact?
>
> 8) How do I add an Account type, a'la Facebook, so that I can sync contact
> data in from MySpace/Livejournal/whatever.
>
> 9) How do I /get/ the nifty status messages and the source for them (a'la
> 'Away for lunch' on 'Google Talk,' or 'eating a pie!' on 'Facebook'), so I
> can display them alongside a contact in my own app?  (Alternatively, some
> ask how they can set the nifty status messages and have them appear in the
> QuickContact bar or in other apps.)
>
> 10) How do I add an action to the QuickContact bar for a contact?
>
> 1-7 seem to be the most-often-asked questions, but I've seen 8-10 around as
> well.  Does anyone else think that this would be worth putting together as a
> little reference and set of samples for 2.0?  Would anyone else be willing
> to pitch in and write one or two of the samples?  I figure, each of the
> items could be tackled as a short write-up individually (and I'll certainly
> do some as well, since I'm the one proposing this).  Maybe we can even get
> one or two of the Google folks to look at the samples when done and confirm
> that the methods used /are/ the best-practice ones. :)
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Best regards,
MTM
Contacts GroupU - Group your Android Contacts
http://contacts-groupu.appspot.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] [Android 2.0] Contacts FAQ?

2009-11-13 Thread Dan Dumont
I think there needs to be a whole set of FAQs written about #8.
There is almost NO documentation written about the accounts APIs, and for
some reason Google is not publishing the source to the accounts tester
application.

I'd love for some google-dev comments on why that is...   or where we can
find it, if it indeed exists...


On Fri, Nov 13, 2009 at 7:21 PM, Rachel Blackman
wrote:

> So, judging from list traffic, there's... confusion, let's say, surrounding
> the Android 2.0 ContactsContract API.  Some parts of the new API are fairly
> straightforward, others?  Not so much.
>
> Look at the threads about "How do I set a contact photo?" or "How do I
> create a new contact under 2.0, from within my app?" (which, of course,
> leads into the whole Accounts thing) or "What do I store as a single,
> consistent value to tie data in my app to a contact, now?  What's the
> reliable key into that data?" or "OMG WTF WHERE ARE THE PHONE NUMBERS?  I
> THINK LITTLE PHONE GOBLINS ATE THEM!" or so on.
>
> (Well, maybe not the last one.)
>
> Some of the questions seem to occur over and over again.  "I *still* can't
> set contact photos!" "Can someone show me how to get the phone numbers for a
> contact, hungry goblins notwithstanding?"  Etc.  I therefore suggest that
> these qualify as FAQs.
>
> So, I'm going to suggest we as a community put together a quick list of
> Common Contact Operations (or Ones People Are Likely To Want), and put
> together some simple little tutorials which can be dumped somewhere on
> GoogleCode.
>
> The questions I see occurring a lot on a couple of web searches are:
>
> 1) How do I just get ALL the contacts under the 2.0 API?
>
> 2) Given a contact, how do I get all the phone numbers?
>
> 3) Given a contact, how do I get all the email addresses?
>
> 4) What sort of identifier should I represent a contact with in my local
> data, so I can later get their most-current data?
>
> 5) How do I set a contact photo?
>
> 6) How do I add a contact to the address book from within an app?
>
> 7) How do I add custom data to a contact?
>
> 8) How do I add an Account type, a'la Facebook, so that I can sync contact
> data in from MySpace/Livejournal/whatever.
>
> 9) How do I /get/ the nifty status messages and the source for them (a'la
> 'Away for lunch' on 'Google Talk,' or 'eating a pie!' on 'Facebook'), so I
> can display them alongside a contact in my own app?  (Alternatively, some
> ask how they can set the nifty status messages and have them appear in the
> QuickContact bar or in other apps.)
>
> 10) How do I add an action to the QuickContact bar for a contact?
>
> 1-7 seem to be the most-often-asked questions, but I've seen 8-10 around as
> well.  Does anyone else think that this would be worth putting together as a
> little reference and set of samples for 2.0?  Would anyone else be willing
> to pitch in and write one or two of the samples?  I figure, each of the
> items could be tackled as a short write-up individually (and I'll certainly
> do some as well, since I'm the one proposing this).  Maybe we can even get
> one or two of the Google folks to look at the samples when done and confirm
> that the methods used /are/ the best-practice ones. :)
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en