SSL handshake request issue with android

Hi all,

I’m currently looking into using your api in an android test application i’m planning on using, however with each request I’m getting a issue between the tfl ssl and android, i’m not sure if there is special headers I have to use with sending request or if there is a possibility of an http request available I could use?

below are details of my request:

uri request:
https://api.tfl.gov.uk/journey/journeyresults/1000266/to/1000013 with (api key and application key added on)

error output:
javax.net.ssl.SSLHandshakeException: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0xb7a351a0: Failure in SSL library, usually a protocol error error:14077102:SSL routines:SSL23_GET_SERVER_HELLO:unsupported protocol (external/openssl/ssl/s23_clnt.c:714

snippet of code to get request:

public String GetHTTPData(String urlString) {
try {
URL url = new URL(urlString);
HttpsURLConnection urlConnection = (HttpsURLConnection) url.openConnection();
// Check the connection status
if (urlConnection.getResponseCode() == 200) {
// if response code = 200 ok
InputStream in = new BufferedInputStream(urlConnection.getInputStream());

I don’t have experience dealing with https type of requests so maybe i’m missing something or if the api is not feasible at all with use on android because of this security requirement?

Hi @ddsoftwareltd

We currently only support modern TLS versions (1.2 and above) and some older versions of Java are incompatible.

I believe updating your Java SDK should resolve the issue for you.

Our blog article in January has more information

Thanks,
James Evans
Technology Service Operations

1 Like