title: Converting iPhone code to Android
body: <p>I put up a problem on Android and didn't get any answer but I've found a similar problem on the iPhone platform with the answer but I don't know how to translate this into Java code. Please can anyone who is well versed in both languages give this a try.</p>
  
  <pre><code>NSString* userAgent = @"Mozilla/5.0";
  
  NSURL *url = [NSURL URLWithString:[@"http://www.translate.google.com/translate_tts?tl=el&amp;q=Καλημέρα" 
                          stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
  
  NSMutableURLRequest* request = [[[NSMutableURLRequest alloc] initWithURL:url] autorelease];
  
  [request setValue:userAgent forHTTPHeaderField:@"User-Agent"];
  
  NSURLResponse* response = nil;
  NSError* error = nil;
  NSData* data = [NSURLConnection sendSynchronousRequest:request
                                   returningResponse:&amp;response
                                               error:&amp;error];
  
  
  [data writeToFile:@"/var/tmp/tts.mp3" atomically:YES];
  </code></pre>