Android Question exchange data with webserver application

lomosami

Member
Licensed User
Longtime User
Hello,
In android there are a lot of webserver application already done and tested by third parts. It is possible to use one of them and exchange data with an android application ? I think it is possible to use read and write file but is not very good.
 

lemonisdead

Well-Known Member
Licensed User
Longtime User
Hello,
If I understand correctly you are asking if your app could "remote control" another server app ? It depends if the other app exposes its intents (if it was built to accept communication from outside of its process)
 
Upvote 0

lomosami

Member
Licensed User
Longtime User
Yes. The scenario is this: android apllication remote control a server app. This server app exchange data with another app android. For example a web server with html page buttom to switch on off a led or something similar.
With intents depend how the web server is made. Any ideas?
 
Upvote 0

lomosami

Member
Licensed User
Longtime User
Thank for your reply lemonisdead.
Another possibility:
Is it possible to use share memory in Android between application? If it is possible to create a web page with const address variable, other application could read and write in the same address. Can android allow this?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

lomosami

Member
Licensed User
Longtime User
The goal is to have 1) android application on a phone, 2) android application on a tablet at home.
The 1st exchange data in internet with the 2nd (It is beautiful this can be accessible also with browser), but I would use a secure protocol such as SSL. To exchange data the idea is to have a web server with html pages. But on B4A now is not possible to create a secure web server (only with B4j is possible, Erel said). So my idea was share data with other web server already done by others with implements SSL and other secure protocols. This web server interact with another android program on the tablet at home to act something. I would have something similar with android https://www.b4x.com/android/forum/threads/webapp-iot-piface-raspberry-pi-server-example.39992/.
But with intents depends how the web server was made. I don't think web server third parts expose such intent to communicate with other application.
 
Upvote 0

KMatle

Expert
Licensed User
Longtime User
B4x+httputils+Server(php+MySql) = Solution

One App (Phone/Tablet) sends a message via httputils to a php script. The receiver (Phone/Tablet) receives it.

Note that this is not a realtime-solution. Use a service to check if there are messages to fetch.
 
Upvote 0

lomosami

Member
Licensed User
Longtime User
Sound very good.
But In what way the exchange message beetwen php and android app can be done? (I think read and write MySQL for example?)
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
But In what way the exchange message beetwen php and android app can be done?
You can - if your webserver app is configured correctly - use for example my MySQL Connector library (Chargeable).
Or a php-script as man-in-the-middle (using httputils2)...
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…