Catching clicks on xml files in the browser
by Rohit » Wed, 18 Mar 2009 05:33:45 GMT
Sponsored Links
Hi,
I am trying to intercept xml links that are clicked in the
android web browser. I want my activity to handle these xml files,
however I cannot seem to get this to work. Whenever I click on the xml
file in the browser it just displays the xml file. Here is the entry
that I have in my AndroidManifest.xml. Is this enough or do I need to
do something more?
<activity
android:name="handleXML"
android:theme="@android:style/Theme.Dialog"
android:screenOrientation="portrait"
>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category
android:name="android.intent.category.DEFAULT" />
<category
android:name="android.intent.category.BROWSABLE" /
<data android:scheme="http" />
<data android:scheme="https" />
<data android:mimeType="application/xml"/>
<data android:mimeType="text/xml"/>
</intent-filter>
</activity>
--~--~---------~--~----~------------~-------~--~----~
Catching clicks on xml files in the browser
by Rohit » Thu, 19 Mar 2009 01:19:00 GMT
I guess adding an intent filter just allows my activity to start up if
someone starts a new intent with that data scheme and mimetype. I
guess it isn't meant for catching clicks in the browser. I guess the
code in the browser app needs to be changed to be able to start off a
new intent when a user clicks on an xml file - too much work? Does
anyone have any pointers as to where to begin if I wanted to do that?
Rohit
--~--~---------~--~----~------------~-------~--~----~
Sponsored Links
Other Threads
1. Mohon testi boss yopie suryadi
Berhub mau transaksi dengan beliau,
Mohon testinya.
Yopie suryadi (yo...@ratjoen.com)
Tks.
sent from galaxy5
--
===============
"Indonesian Android Community [id-android]"
PING'S mobile
Email: sa...@pings-mobile.com Ph. (021) 96087100
---------------------
Yopie Ratjoen
Email: yo...@ratjoen.com Ph. 08977726681
--------------------
Gila original
Email: i...@gilaoriginal.com Ph. (031) 91555898
--------------------
Aturan Jual/Kloteran ID-Android http://goo.gl/azW7
2. Passing an ArrayList of Objects
Is there a way to pass an ArrayList of objects between activities? The
myObject implements Parcelable and I'm able to successfully pass the
objects around individually, but that means I need to have an exact
amount of "myObjects" coded. I want this to dynamically grow/shrink by
what the user does with the app.
I have seen some posts on the web about doing:
Activity A
ArrayList<myObject> myObjArray = new ArrayList<myObject>();
Then when passing this into the intent I would use:
intent.putParcelableArrayListExtra("myObjArray", myObjArray);
Activity B
ArrayList<myObject> myObjArray = new ArrayList<myObject>();
Bundle extras = getIntent().getExtras();
myObjArray = extras.getParcelableArray("myObjArray");
However, the myObjArray always gets filled with "null". How can I
achieve this? Thanks.
--
3. scanning with the camera
4. Spam comments being dealt with
5. Controlling the movement of the android device using android emulator
6. Installation error for "Unknown reason -102"
7. Application to Application (remote) communication