Subversion Repositories SmartDukaan

Rev

Rev 28113 | Rev 28115 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 28113 Rev 28114
Line 130... Line 130...
130
		String status = deviceStatus.getString("value");
130
		String status = deviceStatus.getString("value");
131
 
131
 
132
		if (status.equals("inactive") || status.equals("disconnected")) {
132
		if (status.equals("inactive") || status.equals("disconnected")) {
133
 
133
 
134
			LOGGER.info("status" + status);
134
			LOGGER.info("status" + status);
-
 
135
			okhttp3.RequestBody reqbody = okhttp3.RequestBody.create(null, new byte[0]);
135
 
136
 
136
			Request request2 = new Request.Builder()
137
			Request request2 = new Request.Builder()
137
					.url("https://v3.api.hypertrack.com/devices/" + hyperTrackKey.getHypertrackKeyId() + "/start")
138
					.url("https://v3.api.hypertrack.com/devices/" + hyperTrackKey.getHypertrackKeyId() + "/start")
138
					.post(null).addHeader("Authorization", authString).build();
139
					.post(reqbody).addHeader("Authorization", authString).build();
139
 
140
 
140
			Response resp = client.newCall(request2).execute();
141
			Response resp = client.newCall(request2).execute();
141
			em.setPunchIn(false);
142
			em.setPunchIn(false);
142
			LOGGER.info("resp" + resp);
143
			LOGGER.info("resp" + resp);
143
 
144