public static void checkIOSStatus(JSONObject result, int id)
			throws Exception {
		String appKey = "54448f6bfd98c510370002ea";
		JSONObject obj = new JSONObject();
		obj.put("appkey", appKey);
		obj.put("timestamp", iosTimeStamp);
		obj.put("validation_token", iosValidation);
		obj.put("task_id", result.getJSONObject("data").getString("msg_id"));

		int retrival = 20;

		while (retrival > 0) {
			String localUrl = "http://msg.umeng.com/api/status";
			HttpPost httpPost = new HttpPost(localUrl);
			JSONObject response = null;
			StringEntity s = new StringEntity(obj.toString());
			s.setContentEncoding("UTF-8");
			s.setContentType("application/json");
			httpPost.setEntity(s);
			HttpResponse res = client.execute(httpPost);
			String retSrc = EntityUtils.toString(res.getEntity());
			JSONObject js = JSONObject.parseObject(retSrc);
			System.out.println(js.toJSONString());

			if (!js.getJSONObject("data").getString("status").equals("2")) {
				Thread.sleep(1000);
				retrival--;
			} else {
				// Thread.sleep(1000);
				Connection conn = getConnect();
				try {
					Statement stmt = conn.createStatement();

					String sql = "update fn_notification set flag=1 where id="
							+ id; // 要执行的SQL
					int rs = stmt.executeUpdate(sql);// 创建数据对象

					stmt.close();
					conn.close();
				} catch (SQLException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}

				break;
			}
		}
	}