public static String getThumbnailImagePath(String thumbRemoteUrl) { String thumbImageName= thumbRemoteUrl.substring(thumbRemoteUrl.lastIndexOf("/") + 1, thumbRemoteUrl.length()); String path =PathUtil.getInstance().getImagePath()+"/"+ "th"+thumbImageName; EMLog.d("msg", "thum image path:" + path); return path; }
public static String getThumbnailImagePath(String thumbRemoteUrl) { String thumbImageName= thumbRemoteUrl.substring(thumbRemoteUrl.lastIndexOf("/") + 1, thumbRemoteUrl.length()); String path =PathUtil.getInstance().getImagePath()+"/"+ "th"+thumbImageName; EMLog.d("msg", "thum image path:" + path); return path; }
public static String getImagePath(String remoteUrl) { String imageName= remoteUrl.substring(remoteUrl.lastIndexOf("/") + 1, remoteUrl.length()); String path =PathUtil.getInstance().getImagePath()+"/"+ imageName; EMLog.d("msg", "image path:" + path); return path; }
public static String getThumbnailImagePath(String thumbRemoteUrl) { String thumbImageName= thumbRemoteUrl.substring(thumbRemoteUrl.lastIndexOf("/") + 1, thumbRemoteUrl.length()); String path = PathUtil.getInstance().getImagePath()+"/"+ "th"+thumbImageName; Log.d("msg", "thum image path:" + path); return path; } public static String getMessageDigest(Message message, Context context) {
public static String getImagePath(String remoteUrl) { String imageName= remoteUrl.substring(remoteUrl.lastIndexOf("/") + 1, remoteUrl.length()); String path =PathUtil.getInstance().getImagePath()+"/"+ imageName; EMLog.d("msg", "image path:" + path); return path; }
public static String getThumbnailImagePath(String thumbRemoteUrl) { String thumbImageName= thumbRemoteUrl.substring(thumbRemoteUrl.lastIndexOf("/") + 1, thumbRemoteUrl.length()); String path =PathUtil.getInstance().getImagePath()+"/"+ "th"+thumbImageName; EMLog.d("msg", "thum image path:" + path); return path; }
public static String getImagePath(String remoteUrl) { String imageName= remoteUrl.substring(remoteUrl.lastIndexOf("/") + 1, remoteUrl.length()); String path =PathUtil.getInstance().getImagePath()+"/"+ imageName; EMLog.d("msg", "image path:" + path); return path; }
public static String getThumbnailImagePath(String thumbRemoteUrl) { String thumbImageName= thumbRemoteUrl.substring(thumbRemoteUrl.lastIndexOf("/") + 1, thumbRemoteUrl.length()); String path =PathUtil.getInstance().getImagePath()+"/"+ "th"+thumbImageName; EMLog.d("msg", "thum image path:" + path); return path; }
public static String getImagePath(String remoteUrl) { String imageName= remoteUrl.substring(remoteUrl.lastIndexOf("/") + 1, remoteUrl.length()); String path =PathUtil.getInstance().getImagePath()+"/"+ imageName; EMLog.d("msg", "image path:" + path); return path; }
public static String getImagePath(String remoteUrl) { String imageName= remoteUrl.substring(remoteUrl.lastIndexOf("/") + 1, remoteUrl.length()); String path =PathUtil.getInstance().getImagePath()+"/"+ imageName; EMLog.d("msg", "image path:" + path); return path; }
public static String getThumbnailImagePath(String thumbRemoteUrl) { String thumbImageName= thumbRemoteUrl.substring(thumbRemoteUrl.lastIndexOf("/") + 1, thumbRemoteUrl.length()); String path =PathUtil.getInstance().getImagePath()+"/"+ "th"+thumbImageName; EMLog.d("msg", "thum image path:" + path); return path; }
public static String getImagePath(String remoteUrl) { String imageName= remoteUrl.substring(remoteUrl.lastIndexOf("/") + 1, remoteUrl.length()); String path =PathUtil.getInstance().getImagePath()+"/"+ imageName; EMLog.d("msg", "image path:" + path); return path; }
public static String getThumbnailImagePath(String thumbRemoteUrl) { String thumbImageName= thumbRemoteUrl.substring(thumbRemoteUrl.lastIndexOf("/") + 1, thumbRemoteUrl.length()); String path =PathUtil.getInstance().getImagePath()+"/"+ "th"+thumbImageName; EMLog.d("msg", "thum image path:" + path); return path; }
private void startPhotoZoom(Uri uri1, int size) { Intent intent = new Intent("com.android.camera.action.CROP"); intent.setDataAndType(uri1, "image/*"); // crop为true是设置在开启的intent中设置显示的view可以剪裁 intent.putExtra("crop", "true"); // aspectX aspectY 是宽高的比例 intent.putExtra("aspectX", 1); intent.putExtra("aspectY", 1); // outputX,outputY 是剪裁图片的宽高 intent.putExtra("outputX", size); intent.putExtra("outputY", size); intent.putExtra("return-data", false); intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(PathUtil.getInstance().getImagePath(), imageName))); intent.putExtra("outputFormat", Bitmap.CompressFormat.PNG.toString()); intent.putExtra("noFaceDetection", true); // no face detection startActivityForResult(intent, PHOTO_REQUEST_CUT); }
/** * capture new image */ protected void selectPicFromCamera() { if (!EaseCommonUtils.isSdcardExist()) { Toast.makeText(getActivity(), R.string.sd_card_does_not_exist, 0).show(); return; } cameraFile = new File(PathUtil.getInstance().getImagePath(), EMClient.getInstance().getCurrentUser() + System.currentTimeMillis() + ".jpg"); cameraFile.getParentFile().mkdirs(); startActivityForResult( new Intent(MediaStore.ACTION_IMAGE_CAPTURE).putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(cameraFile)), REQUEST_CODE_CAMERA); }
/** * capture new image */ protected void selectPicFromCamera() { if (!EaseCommonUtils.isSdcardExist()) { Toast.makeText(getActivity(), R.string.sd_card_does_not_exist, Toast.LENGTH_SHORT).show(); return; } cameraFile = new File(PathUtil.getInstance().getImagePath(), EMClient.getInstance().getCurrentUser() + System.currentTimeMillis() + ".jpg"); //noinspection ResultOfMethodCallIgnored cameraFile.getParentFile().mkdirs(); startActivityForResult( new Intent(MediaStore.ACTION_IMAGE_CAPTURE).putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(cameraFile)), REQUEST_CODE_CAMERA); }
/** * 照相获取图片 */ protected void selectPicFromCamera() { if (!EaseCommonUtils.isExitsSdcard()) { Toast.makeText(getActivity(), R.string.sd_card_does_not_exist, Toast.LENGTH_SHORT).show(); return; } cameraFile = new File(PathUtil.getInstance().getImagePath(), EMClient.getInstance().getCurrentUser() + System.currentTimeMillis() + ".jpg"); cameraFile.getParentFile().mkdirs(); startActivityForResult( new Intent(MediaStore.ACTION_IMAGE_CAPTURE).putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(cameraFile)), REQUEST_CODE_CAMERA); }
/** * capture new image */ protected void selectPicFromCamera() { if (!EaseCommonUtils.isSdcardExist()) { Toast.makeText(getActivity(), R.string.sd_card_does_not_exist, 0).show(); return; } cameraFile = new File(PathUtil.getInstance().getImagePath(), EMClient.getInstance().getCurrentUser() + System.currentTimeMillis() + ".jpg"); cameraFile.getParentFile().mkdirs(); startActivityForResult( new Intent(MediaStore.ACTION_IMAGE_CAPTURE).putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(cameraFile)), REQUEST_CODE_CAMERA); }
/** * capture new image */ protected void selectPicFromCamera() { if (!EaseCommonUtils.isSdcardExist()) { Toast.makeText(getActivity(), R.string.sd_card_does_not_exist, Toast.LENGTH_SHORT).show(); return; } cameraFile = new File(PathUtil.getInstance().getImagePath(), EMClient.getInstance().getCurrentUser() + System.currentTimeMillis() + ".jpg"); //noinspection ResultOfMethodCallIgnored cameraFile.getParentFile().mkdirs(); startActivityForResult( new Intent(MediaStore.ACTION_IMAGE_CAPTURE).putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(cameraFile)), REQUEST_CODE_CAMERA); }
/** * capture new image */ protected void selectPicFromCamera() { if (!EaseCommonUtils.isSdcardExist()) { Toast.makeText(getActivity(), R.string.sd_card_does_not_exist, Toast.LENGTH_SHORT).show(); return; } cameraFile = new File(PathUtil.getInstance().getImagePath(), EMClient.getInstance().getCurrentUser() + System.currentTimeMillis() + ".jpg"); //noinspection ResultOfMethodCallIgnored cameraFile.getParentFile().mkdirs(); startActivityForResult( new Intent(MediaStore.ACTION_IMAGE_CAPTURE).putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(cameraFile)), REQUEST_CODE_CAMERA); }