Here is an snippet to comunicate with PHP servers.. it should be much difference with any other language.
Also, you must also find the way to obfuscate the key as much as you can on your android apk can be "extracted" by someone with malicious intentions and look up for the encryption key.