I have tested android-sdk_m5-rc15_windows\samples\ApiDemos\src\com
\google\android\samples\app\GTalkDataMessageSender.java

I have two gmail accounts: [EMAIL PROTECTED](on emulator A) ,[EMAIL 
PROTECTED](on
emulator B)

At first,I sent message from A to B,it doesn't work.
Then I went to the web gmail using [EMAIL PROTECTED],inviting [EMAIL PROTECTED] 
to
chat with.
after [EMAIL PROTECTED] accetpped the chat,I sent message to [EMAIL PROTECTED] 
on
emulator A again,It works.

But I am making a program that will send a message to a new contact,if
I am not in his buddylist,he will never get my message,right?



I found this page:
http://code.google.com/android/reference/com/google/android/gtalkservice/IGTalkSession.html#createChatSession(java.lang.String)

public void blockContact(String contact)
Blocks the contact from subscribing to user's presence or sending the
user messages. The contact is put on the blocked list, and is no
longer visible in the roster.

public IChatSession createChatSession(String to)
Create a ChatSession with the specified contact.

public void removeContact(String contact)
Remove the contact from the roster. This also removes the presence
subscription to the contact.

public void unblockContact(String contact)
Unblocks the contact from blocked list.



My question is
if I want to send a message to a new friend,I should call
unblockContact(contact) first? or maybe there is a bug in
GTalkDataMessageSender.java

Regards
David




--~--~---------~--~----~------------~-------~--~----~
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]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to