Nov 18, 2013 Replies: 49 For new projects it is recommended to use B4XSerializator instead of this solution. AsyncStreamsObject allows you to send and receive objects instead of bytes. You can read more about it here: http://www.b4x.com/android/forum/th...d-and-receive-objects-instead-of-bytes.30543/ This example connects to the same Android example and allows you to communicate with the device. The device app acts as the server as the desktop firewalls usually blocks incoming connections. You can download the Android example here: http://www.b4x.com/android/forum/th...e-objects-instead-of-bytes.30543/#post-202288 Make sure to update B4A RandomAccessFile library to v1.6: http://www.b4x.com/android/forum/th...handle-streams-of-any-size.30494/#post-177051 Once you have a valid connection it is very simple to send and receive custom types, drawings, collections and files. Attachments AsyncStreamsObject.zip AsyncStreamsObject.zip 4.1 KB · Views: 4,036 Last edited: Aug 10, 2016 Click to expand...
For new projects it is recommended to use B4XSerializator instead of this solution. AsyncStreamsObject allows you to send and receive objects instead of bytes. You can read more about it here: http://www.b4x.com/android/forum/th...d-and-receive-objects-instead-of-bytes.30543/ This example connects to the same Android example and allows you to communicate with the device. The device app acts as the server as the desktop firewalls usually blocks incoming connections. You can download the Android example here: http://www.b4x.com/android/forum/th...e-objects-instead-of-bytes.30543/#post-202288 Make sure to update B4A RandomAccessFile library to v1.6: http://www.b4x.com/android/forum/th...handle-streams-of-any-size.30494/#post-177051 Once you have a valid connection it is very simple to send and receive custom types, drawings, collections and files.
M myriaddev Active Member Licensed User Longtime User Nov 22, 2013 #2 WoW! I got both sides to work (Android and PC)!! How do I pass the "correct/original fileNames" to the otherside ? I currently get internal names of the files that increment for the temporary file names on each side. THANKS!!! Last edited: Nov 22, 2013
WoW! I got both sides to work (Android and PC)!! How do I pass the "correct/original fileNames" to the otherside ? I currently get internal names of the files that increment for the temporary file names on each side. THANKS!!!
Erel B4X founder Staff member Licensed User Longtime User Nov 24, 2013 #3 The simplest way is to add the file name to the key (instead of "file").
YIM bunchhat Active Member Licensed User Longtime User Nov 24, 2013 #4 It is so cool..... Excuse me, Is there any way to send without wifi but via internet?, Ex: the same as Skype.
It is so cool..... Excuse me, Is there any way to send without wifi but via internet?, Ex: the same as Skype.
Erel B4X founder Staff member Licensed User Longtime User Nov 24, 2013 #5 You can use your computer as a server. It does however require some configuration. See this thread: No-IP Android client - Access your device over the internet You should do something similar with your PC.
You can use your computer as a server. It does however require some configuration. See this thread: No-IP Android client - Access your device over the internet You should do something similar with your PC.
YIM bunchhat Active Member Licensed User Longtime User Nov 24, 2013 #6 Hello Erel, After I read briefly, I think it is not what I want to do. I am interesting in communication from one device to other device wireless. I ever ask you about CCTV from phone to phone, now I can make it work properly. but I want to upgrade it use without wifi but via internet. I think is the same to Skype that can chat, can live video, send file..etc.....
Hello Erel, After I read briefly, I think it is not what I want to do. I am interesting in communication from one device to other device wireless. I ever ask you about CCTV from phone to phone, now I can make it work properly. but I want to upgrade it use without wifi but via internet. I think is the same to Skype that can chat, can live video, send file..etc.....
Erel B4X founder Staff member Licensed User Longtime User Nov 24, 2013 #7 It is not possible to directly connect two devices over the internet. Mobile provides do not allow incoming connections. Such services use online servers.
It is not possible to directly connect two devices over the internet. Mobile provides do not allow incoming connections. Such services use online servers.
YIM bunchhat Active Member Licensed User Longtime User Nov 24, 2013 #8 Ok thank I just want to know is it possible or not......
M myriaddev Active Member Licensed User Longtime User Dec 9, 2013 #9 I am now getting IP: 192.168.2.1 after BAJ 1.0 and using ipconfig it tells me local ip is 192.168.0.97. On client's xp AsyncStreamsObject IP: 192.168.2.1 and its local ip 192.168.0.28. Before BAJ 1.0, I could connect. Please help.
I am now getting IP: 192.168.2.1 after BAJ 1.0 and using ipconfig it tells me local ip is 192.168.0.97. On client's xp AsyncStreamsObject IP: 192.168.2.1 and its local ip 192.168.0.28. Before BAJ 1.0, I could connect. Please help.
Erel B4X founder Staff member Licensed User Longtime User Dec 10, 2013 #10 The problem is not in B4J 1.0. Something has changed in your network.
M myriaddev Active Member Licensed User Longtime User Dec 10, 2013 #11 Hi Erel. I took your idea, and removed VMware and Virtualbox from my Windows 7 system and now AsyncStreamObject BAJ now correctly reports it's local IP! THANKS!! Currently I can connect from PC to Android(s), and from Android to Android but NOT from Android to PC (two physical locations)l?! Works great once connected. Any ideas ?
Hi Erel. I took your idea, and removed VMware and Virtualbox from my Windows 7 system and now AsyncStreamObject BAJ now correctly reports it's local IP! THANKS!! Currently I can connect from PC to Android(s), and from Android to Android but NOT from Android to PC (two physical locations)l?! Works great once connected. Any ideas ?
Erel B4X founder Staff member Licensed User Longtime User Dec 11, 2013 #12 Windows firewall blocks incoming connections. You will need to open the port in the firewall settings.
Windows firewall blocks incoming connections. You will need to open the port in the firewall settings.
S slowtime Active Member Licensed User Longtime User Dec 27, 2013 #13 Hi, If I change in AsyncStreamsObject TempFolder="C:\" (or other Path ) I can't receive file. Code: Public Sub Initialize (TargetModule As Object, EventName As String) target = TargetModule Event = EventName 'TempFolder = File.DirTemp TempFolder="c:\" Log(File.DirTemp) End Sub Can you help me ? Thank you Ciao
Hi, If I change in AsyncStreamsObject TempFolder="C:\" (or other Path ) I can't receive file. Code: Public Sub Initialize (TargetModule As Object, EventName As String) target = TargetModule Event = EventName 'TempFolder = File.DirTemp TempFolder="c:\" Log(File.DirTemp) End Sub Can you help me ? Thank you Ciao
Erel B4X founder Staff member Licensed User Longtime User Dec 29, 2013 #14 I guess that c:\ is a restricted folder. Try to use a folder such as c:\temp.
S slowtime Active Member Licensed User Longtime User Dec 30, 2013 #15 Thank you, but c:\temp is not the solution. It is strange; file.dirTemp resuts inside a path locked in Windo seven but it is running. I also tryied in a usbPen Drive and a external HD but it is not run. Ciao and good year.
Thank you, but c:\temp is not the solution. It is strange; file.dirTemp resuts inside a path locked in Windo seven but it is running. I also tryied in a usbPen Drive and a external HD but it is not run. Ciao and good year.
Erel B4X founder Staff member Licensed User Longtime User Dec 31, 2013 #16 C:\temp was just an example. The problem is that the root folder is restricted under Windows. If you like you can run your app as an administrator.
C:\temp was just an example. The problem is that the root folder is restricted under Windows. If you like you can run your app as an administrator.
pauleffect Member Licensed User Longtime User Jan 26, 2014 #18 could it be ported to visual studio? i know it's a long shot but.... I'm trying to append some macro for automation purposes and i'd be great if i could cut the middleman, so to speak.
could it be ported to visual studio? i know it's a long shot but.... I'm trying to append some macro for automation purposes and i'd be great if i could cut the middleman, so to speak.
Erel B4X founder Staff member Licensed User Longtime User Jan 26, 2014 #19 See this code: .Net FileTransfer - Implement AsyncStreams Prefix mode
A Asim A Baki Active Member Licensed User Longtime User Feb 18, 2014 #20 Please provide a link to this Desktop example in the article