开发者

how to establish a connection to a webserver in android?

开发者 https://www.devze.com 2022-12-22 17:09 出处:网络
I am working on a Http Connections. I have a l开发者_JAVA技巧ogin form. When the enter a username and password. That values will be processed with the server and the user should be logged in.

I am working on a Http Connections.

I have a l开发者_JAVA技巧ogin form. When the enter a username and password. That values will be processed with the server and the user should be logged in.

Then it shows an users home page in a webview. How to do it?


I'm not 100% sure if I understood your question completely right, but you might wanna check out this tutorial I wrote a few months ago. I hope that helps.

Once you got a positive response ("user logged in") from your http server you just open a new activity implementing a webview and opening that URL. Just keep in mind, that this URL will be publicly accessible, unless you add further security to it. But then it might be easier to implement everything withing a mobile website.

  • Simple HttpClient to send/receive JSON Objects
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号