15 messages in com.googlegroups.android-developersRe: Receive XMPP text messages| From | Sent On | Attachments |
|---|---|---|
| chen...@gmail.com | 21 Nov 2007 15:50 | |
| Leo MRL | 22 Nov 2007 03:22 | |
| chen...@gmail.com | 22 Nov 2007 06:17 | |
| Leo MRL | 22 Nov 2007 09:10 | |
| hemodroid | 23 Nov 2007 04:58 | |
| walterc | 23 Nov 2007 08:06 | |
| hemodroid | 23 Nov 2007 08:36 | |
| hemodroid | 23 Nov 2007 10:31 | |
| Dick Wall | 27 Nov 2007 13:50 | |
| Dick Wall | 27 Nov 2007 15:13 | |
| Ed Burnette | 28 Nov 2007 04:18 | |
| Leo MRL | 28 Nov 2007 05:36 | |
| Peter Blazejewicz | 28 Nov 2007 21:28 | |
| Leo MRL | 29 Nov 2007 03:06 | |
| Quauhtli Martínez | 29 Nov 2007 10:34 |
| Subject: | Re: Receive XMPP text messages![]() |
|---|---|
| From: | Quauhtli Martínez (quau...@gmail.com) |
| Date: | 11/29/2007 10:34:13 AM |
| List: | com.googlegroups.android-developers |
The problem with this
/ CONTENT_URI = "content://im/messages" Cursor cursor = managedQuery(Im.Messages.CONTENT_URI, null, "contact=\'" + "THIS IS YOUR NICK FROM GTalk SERVICE" + "\'", null, null);
is that you always receive the stored messages, not only the new ones.
Any method to delete the read messages?
On Nov 29, 5:07 am, Leo MRL <leom...@gmail.com> wrote:
Hello, Peter.
Thanks very much for the info. I'll give it a try next weekend and post it somewhere too.
Best regards, Leo.
On Nov 29, 3:28 am, Peter Blazejewicz <pete...@gmail.com> wrote:
hi Leo, I remember our previous thread on other group, these sadly not documented at all:
// CONTENT_URI = "content://im/messages" Cursor cursor = managedQuery(Im.Messages.CONTENT_URI, null, "contact=\'" + "THIS IS YOUR NICK FROM GTalk SERVICE" + "\'", null, null); ListAdapter adapter = new SimpleCursorAdapter(this, android.R.layout.simple_list_item_1, cursor, // Give the cursor to the list adatper new String[]{Im.MessagesColumns.BODY}, new int[]{android.R.id.text1});
if you succesfully get content provider everything received on device IM will be available to you via cursor (as data) or as view updates (via view adapter), I think we can setup content/data changed listeners againts cursor or view adapter to know when updates arrives (for any reason), Because that uses undocumented content provider it does not require persmissions in manifest xml at all,
I found that on some blog on web, don't remember right now original source,
regards, Peter
On Nov 28, 2:36 pm, Leo MRL <leom...@gmail.com> wrote:
Yes, what Intent (if any) should I 'subscribe' to to receive TEXT messages from gtalk?
On Nov 28, 10:18 am, Ed Burnette <ed.b...@gmail.com> wrote:
What about XMPP messages to/from other clients on the internet, for example gtalk, jabber, Eclipse chat, etc.? Will that be supported or is just intended for Android<->Android communication?
On Nov 27, 6:13 pm, "Dick Wall" <dw....@google.com> wrote:
Hi again, I have some late breaking information to include
While the intent message structure is correct, as of right now, I must warn you that there is a good chance it will change before the final release of Android. Using the API calls is safe, but if you code something against the XML format you have observed, please be prepared for it to change as we refine the implementation of it. Sorry, this is the reason that the format is not yet documented anywhere, and I should have pointed that out in my original post.
Thanks
Dick
On Nov 27, 2007 1:50 PM, Dick Wall <dw....@google.com> wrote:
Hi Guys
Sorry for the delay in responding - I wanted to make sure I had the important facts down before responding. You have certainly pointed out some areas where our documentation is lacking, so thanks for that. Anyway, in the meantime I have some information that will hopefully help.
The structure you have for the message is accurate, but in particular if you are sending an intent from one android application to another via XMPP, you shouldn't need to go to this level (it will be useful if you intent to construct xmpp activity requests from some other source though, like a ruby script or something like that).
To send an intent via XMPP from an android activity, you can use:
IXmppSession.sendDataMessage(String to, Intent broadcastIntent);
You can construct the intent in the usual way, and then obtain an XMPP session and send the intent using the above API. Full documentation can be found at
For receiving an intent, there is an example in the sample application APIDemo. The XmppDataMessageReceiver shows how you can register an intent that you are interested in receiving using the XmppService. The XmppService should also unpack the data from the XML structure into a standard bundle so that it is consumable by the same onCreate method for your activity.
I hope this helps, and I can see a blog post about this in the not too distant future, as well as improved documentation.
Cheers
Dick
On Nov 23, 2007 10:31 AM, hemodroid < ppro...@orange.fr> wrote:
After some socket debugging i managed to get the intent message structure:
<message id="9pWRN-14" to="hemo...@gmail.com" from="andr...@gmail.com/androidwCxwXphYj3JM " type="chat"> <x token="P8s0A-0" intent_action=" com.google.android.samples.app.XmppDataMessageReceiver.ACTION_DATA_MESSAGE " xmlns="google:data-msg"> <app-data type="poke">Hi, I am Sam.</app-data> <app-data type="question">would you like to eat green eggs and ham?</app-data> </x> <nos:x value="disabled" xmlns:nos="google:nosave" /> <arc:record otr="false" xmlns:arc="http://jabber.org/protocol/ archive" /> </message>
On 23 nov, 17:37, hemodroid <ppro...@orange.fr> wrote:
Any Google dev to post the structure of an intent message sent to the XMPP server? So we can keep on working on our app until they release an improved version of the api.
On 23 nov, 13:58, hemodroid <ppro...@orange.fr> wrote:
Indeed, it seems that android can only receive xmpp intent based messages. So you cant receive messages from other application than Android. That s...!
On 22 nov, 18:10, Leo MRL <leom...@gmail.com > wrote:
If they're reserving it, they suck and I'll start something for symbian :P
I tried to send a Data message to a client outside android and couldn't get anything... What's the deal with that? I want to useXMPP to exit android. Can I? Just tell me already and I build my own transportation layer :(
Well, i think it's not supported right now on the SDK, or maybe google reserving it for their own gtalk client for android ??? :)
BTW, another nice-to-have is the possibility to get contact's avatars....
Any google developer who could shed a light on this subject??.
Thanks in advance. CH
On Nov 22, 8:23 am, Leo MRL < leom...@gmail.com> wrote:
Hi! I've asked the same question in beginner's group and got no answers... I hope this time we get one!
Hi, Can anyone shed a light on how to receivetextmessages with the XMPPservice implementation?. I went trough the data sender - receiver example but i don't understand how to set an intent to receivetext messages. ?. Is there an undocumented intent or action i should be aware of?.
TIA.




