Android, opening PDF
<p>I have a problem with my code in android.</p>

<p>I have a Textview that receives a spanned text (html text) from the method <code>Html.fromHtml("www.mylink.com/something.html");</code>. </p>

<p>I make this link clickable with this code</p>

<pre><code>public static void setView(TextView text, String append)
{
        if(append!=null)
        {
            Spanned htmlSpanned=Html.fromHtml(append);
            text.append((htmlSpanned));
            text.setMovementMethod(LinkMovementMethod.getInstance());
        }
        else
        {
            System.exit(1);
        }
}
</code></pre>

<p>this code is correct when my links are web pages. If I have a link like <code>www.mylink.com/a.pdf</code>, the application crashes. </p>

<p>I always resolved this problem using an intent, but this app does not receive every time the same link, it can be either a pdf or a web link.</p>

<p>How can I resolve this error?</p>
