Did you assign message converters?
Code:
MultiValueMap<String, String> mvm = new LinkedMultiValueMap<String, String>();
mvm.add("login", "100");
RestTemplate restTemplate = new RestTemplate();
List<HttpMessageConverter<?>> messageConverters = new ArrayList<HttpMessageConverter<?>>();
messageConverters.add(new FormHttpMessageConverter());
messageConverters.add(new StringHttpMessageConverter());
restTemplate.setMessageConverters(messageConverters);
String result = restTemplate.postForObject("http://10.1.1.1:9998/security_check", mvm, String.class);
Log.d(TAG, "Result: [" + result + "]");
I noticed that you used localhost. That will not work because the code considers your phone as localhost and it will only work if you have another process on your phone listening on 9998. You need to put an actual IP address or domain name in your url.
Perry Hoekstra