0

I need help in this problem,I am just a student doing my university practices without any help, I have done some scripts in asp, and it is all okay but now I need to learn how can I communicate an android app which I am developing in Android Studio (first time) with an Asp Classic Server, For example a demo.asp like

<%
 name=request(name)
 address=request(address)
 result=name&" "&address
%>

How can I send that parameters to the server and get its response in Android Studio, I hope you can help me. I would really appreciate it.

Kara
  • 6,115
  • 16
  • 50
  • 57
Héctor Valido
  • 31
  • 1
  • 2
  • 5
  • 1
    `and get its response in android studio`. You mean 'in your Android app'. Please remove all references and tags to Android Studio. Your problem is not about using Android Studio. – greenapps Mar 15 '17 at 13:09
  • 1
    It's nothing to do with Classic ASP either, they are basically asking how to communicate with a http server via an Android Application. – user692942 Mar 16 '17 at 05:08
  • 2
    Possible duplicate of [Make an HTTP request with android](http://stackoverflow.com/questions/3505930/make-an-http-request-with-android) – user692942 Mar 16 '17 at 05:09

1 Answers1

0

If you can figure out how to send an HTTP request to a server from your app, then the URL would look something like this:

http://example.com/test.asp?name=Hector&address=123+etc.

You showed a piece of the ASP code that processes these two parameters and concatenates them into a result string. To output that result string you would say:

response.write result

in the ASP script after the lines in your question.

Back in Java in your Android app, you would find the result from the server in the response to your HTTP request. There's a sample here that explains how to talk to a server and get a response.

Community
  • 1
  • 1
Craig
  • 3,253
  • 5
  • 29
  • 43