Created
June 13, 2013 15:44
-
-
Save iraSenthil/5774768 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private void getTotalDistance(String accessToken) { | |
| try { | |
| HttpClient client = new DefaultHttpClient(); | |
| HttpGet get = new HttpGet("http://api.runkeeper.com/records"); | |
| get.addHeader("Authorization", "Bearer " + accessToken); | |
| get.addHeader("Accept", "*/*"); | |
| HttpResponse response = client.execute(get); | |
| String jsonString = EntityUtils.toString(response.getEntity()); | |
| JSONArray jsonArray = new JSONArray(jsonString); | |
| findTotalWalkingDistance(jsonArray); | |
| } catch (Exception e) { | |
| displayToast("Exception occured:("); | |
| e.printStackTrace(); | |
| resetUi(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment