Skip to content
This repository has been archived by the owner on May 14, 2022. It is now read-only.

Commit

Permalink
Fix #7
Browse files Browse the repository at this point in the history
  • Loading branch information
pazaan committed May 15, 2016
1 parent f855a04 commit f309f23
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 65 deletions.
117 changes: 57 additions & 60 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public class UploadHelper extends AsyncTask<Record, Integer, Long> {
public MongoCollection<Document> deviceData = null;
public MongoCollection<Document> dsCollection = null;
public static Boolean isModifyingRecords = false;
public static Object isModifyingRecordsLock = new Object();
public static final Object isModifyingRecordsLock = new Object();
private MongoClient client = null;
public UploadHelper(Context context) {
this(context, Medtronic640gActivity.DEXCOMG4);
Expand Down Expand Up @@ -516,7 +516,7 @@ private void doRESTUploadTo(String baseURI, Record[] records) {

String jsonString = json.toString();

Log.i(TAG, "DEXCOM JSON: " + jsonString);
Log.i(TAG, "Upload JSON: " + jsonString);
log.debug("JSON to Upload "+ jsonString);

try {
Expand Down Expand Up @@ -589,8 +589,8 @@ private void doRESTUploadTo(String baseURI, Record[] records) {

String jsonString = json.toString();

Log.i(TAG, "DEXCOM JSON: " + jsonString);
log.info("DEXCOM JSON: " + jsonString);
Log.i(TAG, "Upload JSON: " + jsonString);
log.info("Upload JSON: " + jsonString);

try {
StringEntity se = new StringEntity(jsonString);
Expand All @@ -614,7 +614,6 @@ private void doRESTUploadTo(String baseURI, Record[] records) {
log.warn( "Unable to post data to: '" + post.getURI().toString() + "'", e);
}
}
postDeviceStatus(baseURL, httpclient);
} catch (Exception e) {
Log.e(TAG, "Unable to post data", e);
log.error("Unable to post data", e);
Expand Down Expand Up @@ -689,6 +688,8 @@ private void postDeviceStatus(String baseURL, DefaultHttpClient httpclient) thro
pumpInfo.put( "battery", battery );
json.put( "pump", pumpInfo );
String jsonString = json.toString();
Log.i(TAG, "Device Status JSON: " + jsonString);
log.debug("Device Status JSON: "+ jsonString);

HttpPost post = new HttpPost(devicestatusURL);
StringEntity se = new StringEntity(jsonString);
Expand Down

0 comments on commit f309f23

Please sign in to comment.