How to send data without connect to wifi?

60 views
Skip to first unread message

Omer Meshy

unread,
Jul 7, 2019, 11:43:24 PM7/7/19
to DroidScript
Hello
How can I send data from device 1 to device 2 without being connect to wifi?

Steve Garman

unread,
Jul 8, 2019, 12:30:01 AM7/8/19
to DroidScript
Depending on your requirements, you could look at Bluetooth.

You can see the basics by downloading Tic-tac-toe from the Demos menu.

Omer Meshy

unread,
Jul 8, 2019, 2:24:20 AM7/8/19
to DroidScript
No. I want to connect between 2 devices without depending the distance.

Symbroson

unread,
Jul 8, 2019, 3:46:36 AM7/8/19
to DroidScript
what exactly do you have in mind if you want a distance independent connection and not using the internet? Do you want to go back to satellites?
The commonly used way which has proven to be relatively reliable is using a web server where all people around the globe can connect to. You do not necessarily need WiFi, just an internet connection of any type.

Omer Meshy

unread,
Jul 8, 2019, 5:39:21 AM7/8/19
to DroidScript
I want to connect between th3 devices by using the internet, not wifi or Bluetooth.
How can I do this?

Steve Garman

unread,
Jul 8, 2019, 5:59:32 AM7/8/19
to DroidScript
It is extremely unlikely that either device will allow an incoming connection, that's just the way phone-data internet connections are set up.

As Symbroson implied, the only practical way to achieve what you seem to be describing is to use some sort of server on the internet that both devices can connect to.

Omer Meshy

unread,
Jul 8, 2019, 11:15:57 AM7/8/19
to DroidScript
It sounds like what I am looking for, but how can I do this?

Symbroson

unread,
Jul 9, 2019, 11:31:35 AM7/9/19
to DroidScript
If you want to let your server run at home you might find useful instructions here:

If not, You can choose any server host you like - there are free ones like bplaced.net or countless ones which you have to pay for like strato or search for reviews or smth

fact is it is not as trivial as you might think if you want the server to be online all the time, and unless you're not managing the server yourself at home you have to deal with the restrictions of the server host.

Omer Meshy

unread,
Jul 9, 2019, 11:29:40 PM7/9/19
to DroidScript
There is any plugin or code that shows hoe to get and update the data on the server?
Message has been deleted

Symbroson

unread,
Jul 10, 2019, 3:40:26 AM7/10/19
to DroidScript

You can send data to the server using the app.HttpRequest method. (see Docs/Reference/Network/HttpRequest)
You should also check out the 'HTTP Get' sample in DroidScript

On the server you typically use php. You can use files and the file_puts_contents or fwrite method or databases to store data on your server. Use the php manual for php related info

Omer Meshy

unread,
Jul 11, 2019, 12:15:31 AM7/11/19
to DroidScript
Ok. I will try it.
Thank you very much for your help.

John

unread,
Jul 11, 2019, 9:46:14 PM7/11/19
to DroidScript
Wasn't there an example of a Firebase based chat app not too long ago?

Steve Garman

unread,
Jul 12, 2019, 12:29:55 AM7/12/19
to DroidScript
I don't remember a recent firebase example.

Back in 2014, Jorge posted a wonderful example https://groups.google.com/d/msg/androidscript/BPkAp3AWpxg/1CVXlgqeOb8J but firebase made some major changes later and that approach is no longer available.

It would be really great if someone could find the time to build a firebase example that works with the latest version of firebase.

Netpower8

unread,
Jul 12, 2019, 1:00:11 AM7/12/19
to DroidScript
i have a recent version of firebase v5.5.2 that works with droidscript as a plugin...
and also got the following working: firebase storage, email verification, user access security.
but cant make firebase log-in working for google, facebook and a few others.

the code is somewhere.

i made some samples (and was about to release it) but that was before the device crash which i lost most codes.
maybe if there is a need by the community... i could try to re-code a working copy again.

Netpower8

unread,
Jul 12, 2019, 1:01:27 AM7/12/19
to DroidScript
and i cant get push notification to work also...
which was a bummer because i want to make it work badly at that time.
Reply all
Reply to author
Forward
0 new messages