0
이봐, 난, 내가
SimpleFtp
라이브러리 만 사용하여 시도 갤러리에서 이미지를 선택하고
ImageView
에 보여
android
응용 프로그램, 내
ftp server
에 집어 이미지를 업로드 할 한
단지 did not는 그것을 삭제했다 그래서, 나는 그것을 어떻게해서 좋은가? - Retrofit2를 API를 작업 할이미지 업로드
public void loadImage(View view)
{
loadedImage = (ImageView)findViewById(R.id.upload_image1);
Drawable drawable = loadedImage.getDrawable();
if(drawable.getConstantState().equals(getResources().getDrawable(R.drawable.camera_icon).getConstantState())) {
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent, "SelectPicture"), SELECT_PICTURE);
}
else
{
Intent i = new Intent(this, ShowImage.class);
i.putExtra("uri",selectedImageURI.toString());
startActivity(i);
}
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode == RESULT_OK) {
if (requestCode == SELECT_PICTURE) {
selectedImageURI = data.getData();
loadedImage = (ImageView)findViewById(R.id.upload_image1);
loadedImage.setScaleType(ImageView.ScaleType.CENTER_CROP);
Glide.with(this).load(selectedImageURI)
.into((ImageView) findViewById(R.id.upload_image1));
}
}
}
"SimpleFtp 라이브러리를 사용해 보았지만 제대로 작동하지 않았습니다."정확히 작동하지 않는 것은 무엇입니까? 디버깅을 시도하고 문제점이 무엇인지 알아 냈습니까? – Egor