/** Package protected for test */ String buildUrl() { StringBuilder sb = new StringBuilder(); sb.append(serverUrl).append("?").append("email=").append(SC2DM.INSTANCE.email()); sb.append("®Id=").append(registrationId); SC2DMLogger.i("Sending to uri: ", sb.toString()); return sb.toString(); }
public void run() { String completeRequestUrl = buildUrl(); try { HttpClient client = new DefaultHttpClient(); HttpGet get = new HttpGet(completeRequestUrl); client.execute(get); SC2DMLogger.i("Registration id sent to: ", serverUrl); } catch (IOException io) { SC2DMLogger.e("Unable to send registration id to " + completeRequestUrl, io); } }