I am trying to achieve a image upload to a server from android
- I have one image,one button
- on click of button i need to post the images to the server
- I need to use multiparty for this
my url which i need to post::http://54.218.73.244:7002/Details/
What i have tried ::
- i have posted a similar question before here but i couldn't achieve mush success
- I have implemented the server scripting and it accepts a image with
the name
key
drawable has image.jpg
in it
activity_main.xml
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="135dp"
android:layout_height="181dp"
android:layout_alignParentTop="true"
android:layout_marginTop="32dp"
android:clickable="false"
android:src="@drawable/image" />
<Button
android:id="@+id/SUBMIT_BUTTON_ID"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="47dp"
android:text="SUBMIT" />
</LinearLayout>
what i need::
- How to write the java functionality for this ?
- My attempt here using MyActivity.java was unsuccessful so looking for it from scratch
i am a newbie for android & image uploading, please be easy on answers