Not logged in. · Lost password · Register
Forum: MatriX RSS
Avatar
ganesh.mitra@indusnet.co.in #1
Member since Mar 2014 · 5 posts
Group memberships: Members
Show profile · Link to this post
Subject: Image transfer in windows phone 8 using c# using Matrix.
Hi,
It is possible to send images to other client? I am windows phone 8 developer in c#.I am using matrix sdk for xmpp client and I am successfully login and sending message to other client but my requirement is that, it is possible to send images to other connected client? If possible please suggest me how can I do this or please give some source code for windows phone 8 using c#.
Avatar
Alex #2
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Of course its possible.
If the Images are small you can crate your own extension and include them in your messages.
When they are bigger then I suggest to use XEP-0047: In-Band Bytestreams.

For IBB Filetransfer you can look at the MiniClient example in the full desktop version of MatriX. There is a file transfer implemented.

Alex
Avatar
ganesh.mitra@indusnet.co.in #3
Member since Mar 2014 · 5 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex,
ThanQ for you valuable reply. Actually I want to send message with image.My image size is 500*500 pixel. How can I do this? Could you please provide some source code in c# for windows phone 8 regarding the same.It will be great help for me if you can provide some C# code for windows phone 8.
ThanQ
Ganesh
Avatar
ganesh.mitra@indusnet.co.in #4
Member since Mar 2014 · 5 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex,

  1. <message from='romeo@montague.net/orchard'
  2.          id='dsw71gj3'
  3.          to='juliet@capulet.com/balcony'>
  4. <body>
  5.     There will be clients in the conference room today around 1 PM!
  6.     As always, be courteous and quiet nearby...
  7.  </body>
  8.  <data xmlns='http://jabber.org/protocol/ibb' seq='0' sid='i781hf64'>
  9.     qANQR1DBwU4DX7jmYZnncmUQB/9KuKBddzQH+tZ1ZywKK0yHKnq57kWq+RFtQdCJ
  10.     WpdWpR0uQsuJe7+vh3NWn59/gTc5MDlX8dS9p0ovStmNcyLhxVgmqS8ZKhsblVeu
  11.     IpQ0JgavABqibJolc3BKrVtVV1igKiX/N7Pi8RtY1K18toaMDhdEfhBRzO/XB0+P
  12.     AQhYlRjNacGcslkhXqNjK5Va4tuOAPy2n1Q8UUrHbUd0g+xJ9Bm0G0LZXyvCWyKH
  13.     kuNEHFQiLuCY6Iv0myq6iX6tjuHehZlFSh80b5BVV9tNLwNR5Eqz1klxMhoghJOA
  14.  </data>
  15. </message>
I think the above xml is a sample of sending message with image and data part is the image base64string.If I am not wrong Please suggest me how can I convert this xml in c#.
This post was edited on 2014-03-31, 19:12 by Alex.
Avatar
Alex #5
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
If you want to send messages including images I suggest to use XEP-0071: XHTML-IM

Alex
Avatar
ganesh.mitra@indusnet.co.in #6
Member since Mar 2014 · 5 posts
Group memberships: Members
Show profile · Link to this post
Hi Alex,
ThanQ for your reply. Actualy I am not sending images with messages,user can have 3 option one is only message is sending and another is message with image and another is only image is sending and he can select the image from image gallery in phone.So if I am sending message with HTML body then I am not understand what is the src?And how can I set the src?And one think from gallery we can't return any http... format image how can I do this?
  1. <message>
  2.  <body>Hey, are you licensed to Jabber?
  3.  
  4.   http://www.xmpp.org/images/psa-license.jpg
  5.  </body>
  6.  <html xmlns='http://jabber.org/protocol/xhtml-im'>
  7.     <body xmlns='http://www.w3.org/1999/xhtml'>
  8.       <p>Hey, are you licensed to <a href='http://www.jabber.org/'>Jabber</a>?</p>
  9.       <p><img src='http://www.xmpp.org/images/psa-license.jpg'
  10.               alt='A License to Jabber'
  11.               height='261'
  12.               width='537'/></p>
  13.     </body>
  14.  </html>
  15. </message>
Please help......
ThanQ
Ganesh
This post was edited 3 times, last on 2014-03-31, 19:12 by Alex.
Avatar
Alex #7
Member since Feb 2003 · 4322 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
that's all explained in the XEP link I sent you.
See also the reference to:
XEP-0231: Bits of Binary
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: MatriX RSS