| | |
| | | if (fragment_visitor_register_surveillance_photo_img != null) {
|
| | | ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
| | | fragment_visitor_register_surveillance_photo_img.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream);
|
| | | byte[] imageBytes = byteArrayOutputStream.toByteArray();
|
| | |
|
| | | params.addBodyParameter("surveillancePhoto", FileUtil.writeToFile("surveillancePhoto", imageBytes));
|
| | | params.addBodyParameter("surveillancePhoto", FileUtil.writeToFile("surveillancePhoto", byteArrayOutputStream.toByteArray()));
|
| | | } else {
|
| | | params.addBodyParameter("surveillancePhoto", FileUtil.writeToFile("surveillancePhoto", new byte[]{}));
|
| | | }
|
| | |
| | | if (fragment_visitor_register_upload_custom_photo_img != null) {
|
| | | ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
| | | fragment_visitor_register_upload_custom_photo_img.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream);
|
| | | byte[] imageBytes = byteArrayOutputStream.toByteArray();
|
| | |
|
| | | params.addBodyParameter("uploadCustomPhoto", FileUtil.writeToFile("uploadCustomPhoto", imageBytes));
|
| | | params.addBodyParameter("uploadCustomPhoto", FileUtil.writeToFile("uploadCustomPhoto", byteArrayOutputStream.toByteArray()));
|
| | | } else {
|
| | | params.addBodyParameter("uploadCustomPhoto", FileUtil.writeToFile("uploadCustomPhoto", new byte[]{}));
|
| | | }
|
| | |
| | | if (fragment_visitor_register_id_card_photo_img != null) {
|
| | | ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
| | | fragment_visitor_register_id_card_photo_img.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream);
|
| | | byte[] imageBytes = byteArrayOutputStream.toByteArray();
|
| | |
|
| | | params.addBodyParameter("idCardPhoto", FileUtil.writeToFile("idCardPhoto", imageBytes));
|
| | | params.addBodyParameter("idCardPhoto", FileUtil.writeToFile("idCardPhoto", byteArrayOutputStream.toByteArray()));
|
| | | } else {
|
| | | params.addBodyParameter("idCardPhoto", FileUtil.writeToFile("idCardPhoto", new byte[]{}));
|
| | | }
|
| | |
| | | if (fragment_visitor_register_surveillance_photo_img != null) {
|
| | | ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
| | | fragment_visitor_register_surveillance_photo_img.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream);
|
| | | byte[] imageBytes = byteArrayOutputStream.toByteArray();
|
| | |
|
| | | surveillancePhotoBytes = imageBytes;
|
| | | surveillancePhotoBytes = byteArrayOutputStream.toByteArray();
|
| | | }
|
| | | FileUtil.writeToFile(surveillancePhotoPath, surveillancePhotoBytes);
|
| | | offlineVisitorRegisterItem.setSurveillancePhotoPath(surveillancePhotoPath);
|
| | |
| | | if (fragment_visitor_register_upload_custom_photo_img != null) {
|
| | | ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
| | | fragment_visitor_register_upload_custom_photo_img.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream);
|
| | | byte[] imageBytes = byteArrayOutputStream.toByteArray();
|
| | |
|
| | | uploadCustomPhotoBytes = imageBytes;
|
| | | uploadCustomPhotoBytes = byteArrayOutputStream.toByteArray();
|
| | | }
|
| | | FileUtil.writeToFile(uploadCustomPhotoPath, uploadCustomPhotoBytes);
|
| | | offlineVisitorRegisterItem.setUploadCustomPhotoPath(uploadCustomPhotoPath);
|
| | |
| | | if (fragment_visitor_register_id_card_photo_img != null) {
|
| | | ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
| | | fragment_visitor_register_id_card_photo_img.compress(Bitmap.CompressFormat.JPEG, 100, byteArrayOutputStream);
|
| | | byte[] imageBytes = byteArrayOutputStream.toByteArray();
|
| | |
|
| | | idCardPhotoBytes = imageBytes;
|
| | | idCardPhotoBytes = byteArrayOutputStream.toByteArray();
|
| | | }
|
| | | FileUtil.writeToFile(idCardPhotoPath, idCardPhotoBytes);
|
| | | offlineVisitorRegisterItem.setIdCardPhotoPath(idCardPhotoPath);
|
| | |
| | |
|
| | | //@OnClick(R.id.fragment_visitor_register_country)
|
| | | public void fragment_visitor_register_country_click(View view) {
|
| | | new CountryDialog(fragment_visitor_register_linear_layout, new OkClickedListener() {
|
| | | public void onSelected(String value) {
|
| | | fragment_visitor_register_country.setValue(value);
|
| | | }
|
| | | },fragment_visitor_register_country.getValue());
|
| | | if (CountryDialog.hasCountries()) {
|
| | | new CountryDialog(fragment_visitor_register_linear_layout, new OkClickedListener() {
|
| | | public void onSelected(String value) {
|
| | | fragment_visitor_register_country.setValue(value);
|
| | | }
|
| | | }, fragment_visitor_register_country.getValue());
|
| | | }
|
| | | }
|
| | |
|
| | | //@OnClick(R.id.fragment_visitor_register_gender)
|