Hello.

There is an application with two EditText elements and a button. By clicking on the button, you need to transfer all the text entered in this field to the field on the website and click the button on this page.

Update

API no. The site is not mine, it belongs to a mobile operator. Yes, I try to do it through the Http post.

In the source of the site I see "<input id="phoneCode" class="txt" type="text" name="code" maxlength="3" value="" />" .

Ie I need to write something like

 "List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(1); nameValuePairs.add(new BasicNameValuePair("phoneCode.value", CodeP));"? 
  • Look towards Http post requests. If you are developing the site, it is easier to write your own API. - Micah
  • Updated the question. - Anzohan

1 answer 1

If the site has no API, then you need to look at its source code and traffic. See which request goes by clicking on the button, respectively, send a similar request, substituting your data.

Update

Well, I would do this:
In chrome, open this site, press F12, go to the network tab, enter data in the input, press the button. If, after pressing a button, no redirect occurs, it is most likely that the top request will be the same POST, which is left at the touch of a button. If there is a redirect, then you need to pause in the same panel. See its structure and make a similar request from Java code.