Android Question Transferring data to the server

red30

Well-Known Member
Licensed User
Longtime User
I have a GMS module which can work with MQTT and Web Service. I need to get data from it and store it somewhere. As I understood from the forum, I cannot run my own MQTT server. So I settled on Web Service.
I imagine it like this: on an Android or Windows device, I run a server that I can access via GET or POST to transfer data. I also wanted to be able to connect to this server using a separate application and read the data.
How can I do it better? Is it possible to create such a server using B4A or B4J?
 

DonManfred

Expert
Licensed User
Longtime User
Is it possible to create such a server using B4A or B4J?
B4A no. B4J Yes. But you need a server which is able to run B4J-Apps.

You told you cannot run your own MQTT so you used a webservice.
The webservice can not run java-apps, right?
In that case you can not run B4J apps as well.

You need a Server or a VPS to run java (B4J) Apps. On this server you even can install a MQTT-Broker.
 
Upvote 0

red30

Well-Known Member
Licensed User
Longtime User
B4A no. B4J Yes. But you need a server which is able to run B4J-Apps. You told you cannot run your own MQTT so you used a webservice.
The webservice can not run java-apps, right? In that case you can not run B4J apps as well.
As I understood from the forum, I can run my own MQTT, but only within the same network. I want clients to be able to connect from various devices that are not within this network ... As I understand it, in this case, I can only rent a server?
That's why I made the decision to use a web service.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
That's why I made the decision to use a web service.
and limit yourself using php or similar solutions.

I suggest to rent a VPS. There are cheap ones available. If you are ok with Linux servers it can be relatively cheap ($5 approx)

Windows VPS are more expensive. But even here you can get a small one under $10/Month.
 
Upvote 0

red30

Well-Known Member
Licensed User
Longtime User
and limit yourself using php or similar solutions.

I suggest to rent a VPS. There are cheap ones available. If you are ok with Linux servers it can be relatively cheap ($5 approx)

Windows VPS are more expensive. But even here you can get a small one under $10/Month.
I'm a little confused... Do you think it's better to use MQTT and rent a server?
where do you can run the MQTT? On your pc? Why you can only connect to it from within the same network?
I used this example. My phone was connected to Wi-Fi. And all PCs and phones connected to this network could work. But if I try to connect my phone via mobile internet to this server, I won't be able to do it.
 
Last edited:
Upvote 0
Top