Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: What ways of communicating wireless between a Acell and a PC is available?


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 3 - Last Post: Dec 21, 2017 1:12 PM Last Post By: Markus Humm
Marcus de Bruin

Posts: 1
Registered: 5/30/07
What ways of communicating wireless between a Acell and a PC is available?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 21, 2017 4:04 AM
I need to write an app for Android that need to send text to a PC. It sends small messages, types in by the user, about one every minute. It need to be received in a few seconds. The PC and Android will be about 200m from each other. It could be internet, sms or wi-fi. What ways of communication is available? What is the main components in FireMonkey? I use Delphi10.2 professional.

P.S.: all the data will be stored in MySql on a website as well.

I just went through a nightmare of writing a website, and went through efforts ( Java, then Node.js ) before settling on (or "biting the bullit with") JavaScript and PHP. I find it difficult to determine what tools to use by searching the Internet. Any help would be appreciated.
William Brookfi...

Posts: 55
Registered: 1/1/10
Re: What ways of communicating wireless between a Acell and a PC is available?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 21, 2017 5:52 AM   in response to: Marcus de Bruin in response to: Marcus de Bruin
Marcus de Bruin wrote:
I need to write an app for Android that need to send text to a PC. It sends small messages, types in by the user, about one every minute. It need to be received in a few seconds. The PC and Android will be about 200m from each other. It could be internet, sms or wi-fi. What ways of communication is available? What is the main components in FireMonkey? I use Delphi10.2 professional.

P.S.: all the data will be stored in MySql on a website as well.

I just went through a nightmare of writing a website, and went through efforts ( Java, then Node.js ) before settling on (or "biting the bullit with") JavaScript and PHP. I find it difficult to determine what tools to use by searching the Internet. Any help would be appreciated.

Delphi's thttp component on the client can send a POST message to a web server. The code is send is very simple and there are a number of examples you can find using google.

function PostExample: string;
var
  lHTTP: TIdHTTP;
  lParamList: TStringList;
begin
  lParamList := TStringList.Create;
  lParamList.Add('id=1');
 
  lHTTP := TIdHTTP.Create;
  try
    Result := lHTTP.Post('http://blahblahblah...', lParamList);
  finally
    lHTTP.Free;
    lParamList.Free;
  end;
end;


A simple web app using Delphi, NodeJS or PHP can listen for incoming POST requests from the client and then update the SQL server.
For Delphi, you can build a simple app the has the ThttpServer component that listens for the POST or GET requests and fires off the OnCommandGet
event you define to process the messages you send from the client.
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: What ways of communicating wireless between a Acell and a PC is available?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 21, 2017 9:05 AM   in response to: Marcus de Bruin in response to: Marcus de Bruin
Marcus de Bruin wrote:

I need to write an app for Android that need to send text to a PC.
It sends small messages, types in by the user, about one every
minute. It need to be received in a few seconds. The PC and Android
will be about 200m from each other. It could be internet, sms or
wi-fi. What ways of communication is available?

You will be pretty much limited to just TCP or UDP in that scenario.
You will have to open a server socket on the PC, and a client socket on
the Android device. Then the Android app can connect to the PC app and
they can exchange data however you want.

What is the main components in FireMonkey?

There aren't any "main" components. But Delphi does ship with Indy
pre-installed, and it has many TCP/UDP based components. But there are
also many 3rd party components available, too. Or you could just
resort to using straight OS socket APIs directly.

P.S.: all the data will be stored in MySql on a website as well.

Well, in that case, the Android app could post data into the
database, and then the PC could poll it, and vice versa. I probably
wouldn't go that route, though. But it is an option.

--
Remy Lebeau (TeamB)
Markus Humm

Posts: 5,113
Registered: 11/9/03
Re: What ways of communicating wireless between a Acell and a PC is available?  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 21, 2017 1:12 PM   in response to: Marcus de Bruin in response to: Marcus de Bruin
Am 21.12.2017 um 13:04 schrieb Marcus de Bruin:
I need to write an app for Android that need to send text to a PC. It sends small messages, types in by the user, about one every minute. It need to be received in a few seconds. The PC and Android will be about 200m from each other. It could be internet, sms or wi-fi. What ways of communication is available? What is the main components in FireMonkey? I use Delphi10.2 professional.

P.S.: all the data will be stored in MySql on a website as well.

I just went through a nightmare of writing a website, and went through efforts ( Java, then Node.js ) before settling on (or "biting the bullit with") JavaScript and PHP. I find it difficult to determine what tools to use by searching the Internet. Any help would be appreciated.

Another option is to use AppThethering, something EMBT created to make
such scenarious easier and to abstract from WiFi and Bluetooth as it
works for both techniques the same way afaik.

In the demos installed along there should be one for this afaik.

Greetings

Markus
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02