@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); NsisApplication.getInstance().addActivity(this); Education video = (Education) getIntent().getSerializableExtra("video"); if (video != null) { mTextTitle.setText(video.getTitle()); mTextTime.setText(video.getTime()); String urlString = LoginInfo.mFileUrl.getUrl() + "/" + video.getUrl(); L.i("视频地址:" + urlString); Uri uri = Uri.parse(urlString); mVideoView.setMediaController(new MediaController(this)); mVideoView.setVideoURI(uri); mVideoView.start(); mVideoView.requestFocus(); } }
/** 保存责任分组信息 */ private void saveDutyBedData(final String officeId, String groupId, List<Bed> bedList) { StringBuilder sb = new StringBuilder(); for (Bed b : bedList) { if (b.isSelected()) { sb.append(b.getHisBedNo() + ","); } } String nos; if (sb.toString().endsWith(",")) { nos = sb.substring(0, sb.length() - 1); } else { nos = sb.toString(); } L.i("所有床:" + nos); try { String url = ServiceConstant.SERVICE_IP + ServiceConstant.SCHEDULE_SERVICE + ServiceConstant.SAVE_WEB_RESPONSIBILITY_GROUP + "?officeid=" + officeId + "&responsibilityID=" + groupId + "&bedinfos=" + URLEncoder.encode(nos, "UTF-8"); HttpGetUtil getUtil = new HttpGetUtil() { @Override public void success(String json) { L.i("保存返回值" + json); Intent intent = new Intent(); intent.setAction(DutyGroupActivity.GROUP_UPDATE); sendBroadcast(intent); finish(); } }; getUtil.doGet(this, url, "读取床位"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } }