how to download a file using uri in android?
<p>my code is given below . i want to type URI in the edittext and download that file by clicking the download button.so please give me a solution for downloading the file.
    
         </p>

<pre><code>    &lt;LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" &gt;

        &lt;TextView
            android:id="@+id/txtvUri"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/URi"
            android:textAppearance="?android:attr/textAppearanceSmall" /&gt;

        &lt;EditText
            android:id="@+id/etxtUri"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:ems="10" 
            android:hint="Enter the URI"&gt;

            &lt;requestFocus /&gt;
        &lt;/EditText&gt;

    &lt;/LinearLayout&gt;

    &lt;LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center" &gt;

        &lt;Button
            android:id="@+id/button1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/download"
            android:clickable="true"
            android:onClick="click" /&gt;

    &lt;/LinearLayout&gt;

&lt;/LinearLayout&gt;
</code></pre>
