Android Tutorial Embed an Http Server in your Android Application

Status
Not open for further replies.

DonManfred

Expert
Licensed User
Longtime User

May i ask what device you have which have an ehternet-port?
 

EvgenyB4A

Active Member
Licensed User
Longtime User
The device I use has both ethernet and wifi ports. I think the problem is the same as in B4A-bridge app. The B4A-bridge also works with Wifi only. So I need that HTTP server and maybe B4A-bridge could work with ethernet and maybe with 3G.
 

EvgenyB4A

Active Member
Licensed User
Longtime User
I think I have solved the issue by changing ssocket.GetMyWifiIP to ssocket.GetMyIP in HTTPServerExample. Now it works on Ethernet too.
 

EvgenyB4A

Active Member
Licensed User
Longtime User
If you know the device ip address then you can connect to it with any valid connection. What I meant to say without a more complex solution it is not possible to access the server over the internet.
I use internal network for a while. It needs to configure firewall to access the server from outside.
 

IslamQabel

Active Member
Licensed User
Longtime User
Dear All:

I am Asking about The web page in Firefox, how to build it? or it is already built by the Embedded Http server in my mobile???? i am somehow confused
 

IslamQabel

Active Member
Licensed User
Longtime User
Very good Thanks Erel

Can i make some changes in graphics and font of the built page or it is unavailable ?
 

DonManfred

Expert
Licensed User
Longtime User
Have a look at the source of this example (Files/main_template.html)...
 

pauleffect

Member
Licensed User
Longtime User
Very good Thanks Erel

Can i make some changes in graphics and font of the built page or it is unavailable ?

You can specify whatever html file you want. I didn't try an external css(it should work though), but you can embed css rules in the html file of your choice.

If you place certain keywords in the html file, you can replace those with variables generated by your app.

Just treat the situation like it would be a classic web design thing and that's it.
 

IslamQabel

Active Member
Licensed User
Longtime User
Thanks all.....
I will try it but unfortunately i do not know well about CSS rules and also web design rules but i will try to make different web page....If you have a link that could help me that is will be OK......................I do not want to learn new language because i am programming with C for micro-controllers and B4A so i can not add another language
 

IslamQabel

Active Member
Licensed User
Longtime User
So is there is a library in B4A to design web page as seen in (Files/main_template.html)? as DonManfred told me
 

IslamQabel

Active Member
Licensed User
Longtime User
Dear All:

Erel Said:
"Http server means that you can point a browser to the device IP address (and relevant port) and communicate with your app.

It can be very useful in many applications."


How to access the server as i can not access it via the Internet? what is the link between PC and the mobile phone?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…