aynulhassan / asmack

Automatically exported from code.google.com/p/asmack
Other
0 stars 0 forks source link

android在FileTransfer上的问题 #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What are you doing to produce the error?
1.是用文件传输的时候,addFileTransferListener(……)不能监听�
��
2.sendFile()和sendStream()这两个方法不能使用,会抛出线程
错误。
3.

What version of aSmack / Android / Device do you use?
我用asmack-issues.jar 
android用2.0

Original issue reported on code.google.com by geolo...@gmail.com on 18 May 2010 at 4:40

GoogleCodeExporter commented 8 years ago
Please report in english. I'm not able to read/understand your problem, and 
others
won't be able to understand it, too.

Regards,
  Rene

Original comment by rtreffer@gmail.com on 18 May 2010 at 7:13

GoogleCodeExporter commented 8 years ago
A chinese friend did a very basic translation.

Here are some hints: asmack requires manual registration of packets & packet 
managers.

http://github.com/rtreffer/smack/blob/master/source/org/jivesoftware/smackx/file
transfer/FileTransferManager.java
need to be instanciated for your connection

You'll also have to register all the filetransfer related packets, see
http://code.google.com/p/buddycloud/source/browse/trunk/client/android/main/src/
com/buddycloud/jbuddycloud/BuddycloudClient.java#45
and
http://svn.igniterealtime.org/svn/repos/smack/trunk/build/resources/META-INF/sma
ck.providers
for deatails.

Loading from sdcard or writing to the sdcard requires special privileges.

I don't care about your spelling or grammar as long as I can help you, so 
please try
to use english and I'll try to help :-)

Regards,
  RT

Original comment by rtreffer@gmail.com on 18 May 2010 at 9:33

GoogleCodeExporter commented 8 years ago
Please post the full stacktrace if available.

Original comment by rtreffer@gmail.com on 18 May 2010 at 9:34

GoogleCodeExporter commented 8 years ago
Thank you, I'm on my question. There will be a good way to resolve it. 

Original comment by geolo...@gmail.com on 19 May 2010 at 12:43

GoogleCodeExporter commented 8 years ago
I using OutgoingFileTransfer send file from android sdcard. The transfer status 
is always initial and the Progress is always 0.0. I am using 
asmack-jse-buddycloud-2010.12.11.jar.  
Sent:12-05 05:52:03.252: I/System.out(1747): 05:52:03 上午 SENT (1079215432): 
<iq id="B43Qi-12" to="zhangyi@weilet.com/Smack" from="10032@weilet.com/Smack" 
type="set"><si xmlns="http://jabber.org/protocol/si" 
id="jsi_6315029666031340332" mime-type="text/plain" 
profile="http://jabber.org/protocol/si/profile/file-transfer"><file 
xmlns="http://jabber.org/protocol/si/profile/file-transfer" 
name="scriptlog.txt" size="5842" ><desc>you won't like it</desc></file><feature 
xmlns="http://jabber.org/protocol/feature-neg"><x xmlns="jabber:x:data" 
type="form"><field var="stream-method" 
type="list-multi"><option><value>http://jabber.org/protocol/bytestreams</value><
/option><option><value>http://jabber.org/protocol/ibb</value></option></field></
x></feature></si></iq>

RCV: 12-05 05:52:03.302: I/System.out(1747): 05:52:03 上午 RCV  (1079215432): 
<iq type="error" id="B43Qi-12" from="zhangyi@weilet.com/Smack" 
to="10032@weilet.com/Smack"><si xmlns="http://jabber.org/protocol/si" 
id="jsi_6315029666031340332" mime-type="text/plain" 
profile="http://jabber.org/protocol/si/profile/file-transfer"><file 
xmlns="http://jabber.org/protocol/si/profile/file-transfer" 
name="scriptlog.txt" size="5842"><desc>you won't like it</desc></file><feature 
xmlns="http://jabber.org/protocol/feature-neg"><x xmlns="jabber:x:data" 
type="form"><field var="stream-method" 
type="list-multi"><option><value>http://jabber.org/protocol/bytestreams</value><
/option><option><value>http://jabber.org/protocol/ibb</value></option></field></
x></feature></si><error code="503" type="cancel"><service-unavailable 
xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>

Original comment by yuio4...@gmail.com on 12 Dec 2011 at 12:47

Attachments: