I have an ImageView
and I want get the path of image and add in a String
. I want do this because I need send this to my webservice like a default image
How can I do it ?
ImageView
<ImageView
android:id="@+id/ivPerfil"
android:padding="5dp"
android:layout_width="120dp"
android:layout_height="120dp"
android:src="@drawable/icon_usuario"
android:scaleType="fitXY"
/>
Getting the path
ivPerfil = (ImageView)findViewById(R.id.ivPerfil);
Drawable img = getResources().getDrawable(R.drawable.icon_usuario);
String pathImage = img.toString();