interupting link to my app
<p>I have a problem. Iam using the below code to interupt links to my app as </p>

<pre><code>&lt;intent-filter&gt;
    &lt;action android:name="android.intent.action.VIEW"/&gt;
    &lt;category android:name="android.intent.category.DEFAULT"/&gt;
    &lt;category android:name="android.intent.category.BROWSABLE"/&gt;
    &lt;data android:scheme="http" android:host="twitter.com"/&gt;
    &lt;data android:scheme="http" android:host="facebook.com"/&gt;
&lt;/intent-filter&gt;
</code></pre>

<p>But the problem is that I need to set data scheme and host at runtime i.e. I can add or delete the host at runtime. SO please somebody help me in setting the value of data scheme and host at runtime.I am using below code but it is not working</p>

<pre><code>IntentFilter filter = new IntentFilter();
filter.addAction("android.intent.action.VIEW");
filter.addCategory("android.intent.category.DEFAULT");
filter.addCategory("android.intent.category.BROWSABLE");
filter.addDataScheme("http");
filter.addDataAuthority("www.facebook.com", null);
RecieveBroadcaster  receiver = new RecieveBroadcaster();
registerReceiver(receiver, filter);
</code></pre>
