Communicating with computer
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Communicating with computer
Hey all
So, I want to make an app that I can use to use as a basic control for my computer (open internet sites and folders etc).
Is there a way that I can use Livecode to make an app for android that can communicate with my computer somehow, even if it's through another app on my computer?
Many thanks
So, I want to make an app that I can use to use as a basic control for my computer (open internet sites and folders etc).
Is there a way that I can use Livecode to make an app for android that can communicate with my computer somehow, even if it's through another app on my computer?
Many thanks
Re: Communicating with computer
In version 7.1 sockets for android was introduced. I have tested it working to communicate with a computer from android and vice versa.
If your application on the computer listens for socket data from android and uses the data to determine how to respond it is perfectly possible. For instance when you press button 1 on the android and receive that data on the desktop, you can "launch URL..." or on receipt of data sent from button 2 you can "get shell(" whatever command line instruction you need to open a folder on your platform ")
If your application on the computer listens for socket data from android and uses the data to determine how to respond it is perfectly possible. For instance when you press button 1 on the android and receive that data on the desktop, you can "launch URL..." or on receipt of data sent from button 2 you can "get shell(" whatever command line instruction you need to open a folder on your platform ")
Re: Communicating with computer
That sounds absolutely perfect! Is there a tutorial around I can use, or could you tell me a few quite things on how to use itSparkOut wrote:In version 7.1 sockets for android was introduced. I have tested it working to communicate with a computer from android and vice versa.
If your application on the computer listens for socket data from android and uses the data to determine how to respond it is perfectly possible. For instance when you press button 1 on the android and receive that data on the desktop, you can "launch URL..." or on receipt of data sent from button 2 you can "get shell(" whatever command line instruction you need to open a folder on your platform ")

Re: Communicating with computer
Look up in lessons.runrev.com for sockets tutorial. And in the resource centre menu in the idea down at the bottom of the sample stacks there is a chatrev stack you can use for ideas. If get chance ( using phone ATM here) I will see if I can make a basic pair of stacks for an example.
Re: Communicating with computer
Here is a zipped file containing a pair of stacks, one for desktop, one for android.
They are ripped up from some of my apps in progress so there may be a bit of unnecessary stuff in there. There will be quite a bit of overkill on the resetting/closing/shutting down - if any sockets are left open then your standalone will close but the process will remain open in memory on the desktop, so I've been heavy handed there.
Try it and see.
They are ripped up from some of my apps in progress so there may be a bit of unnecessary stuff in there. There will be quite a bit of overkill on the resetting/closing/shutting down - if any sockets are left open then your standalone will close but the process will remain open in memory on the desktop, so I've been heavy handed there.
Try it and see.
- Attachments
-
- SocketsSampler.zip
- Sockets on Android sampler
- (5.39 KiB) Downloaded 274 times
Re: Communicating with computer
Livecode lesson is here, btw: http://lessons.runrev.com/m/4071/l/1292 ... ng-sockets
Also these are possibly simpler and more instructive (thanks Bjoernke) : http://livecodeshare.runrev.com/stack/5 ... ket-server and http://livecodeshare.runrev.com/stack/5 ... ket-client
Also these are possibly simpler and more instructive (thanks Bjoernke) : http://livecodeshare.runrev.com/stack/5 ... ket-server and http://livecodeshare.runrev.com/stack/5 ... ket-client