Intent to handle files opened in browser ending .droid.txt

by Alec » Sun, 19 Apr 2009 02:13:06 GMT


Sponsored Links
 Hi Im having an issue with intents. Im attempting to have the google
browser open my application when it opens a blahblah.droid.txt however
am having no luck. Here's what ive got so far:

<activity android:name=".engines.droidTxtHandler">
                        <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:mimeType="text/*" 
android:scheme="http"
                                        android:host="*" 
android:pathPattern=".*\\.droid.txt" />
                        </intent-filter>
</activity>

Could anyone point out where im going wrong? At the moment the file
just opens in the browser.

Many thanks

Alec
--~--~---------~--~----~------------~-------~--~----~



Intent to handle files opened in browser ending .droid.txt

by CaptainFanatic » Tue, 26 May 2009 08:14:26 GMT


 I am having trouble with this too.

I have tried using a html file with a new mime type for my
application:

...
<head>
<meta http-equiv="Content-Type" content="application/myapp">
</head>
...

I have tried using .html and .myapp file extensions.

My intent filters are something like this:

<intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:mimeType="application/myapp" android:scheme="http" /
</intent-filter>

But my application is not started.

I have found a few different suggestions for this problem but none
have worked so far. Has anyone gotten this to work?

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Intent to handle files opened in browser ending .droid.txt

by Alec » Tue, 26 May 2009 16:28:25 GMT


 Hi,

Here's what i ended up using hopefully it will help you. This intent
only matches on the file name, not on the mimetype.

Let me know how you got on.

                        <intent-filter>
                                <action 
android:name="android.intent.action.VIEW"></action>
                                <category 
android:name="android.intent.category.DEFAULT"></
category>
                                <category 
android:name="android.intent.category.BROWSABLE"></
category>
                                <data android:scheme="http" android:host="*"
                                        android:pathPattern=".*\\.droid.txt" />
                        </intent-filter>

Alec



--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Using raw resource sound file as Ringtone

I have a problem setting a ringtone from a resource in my app:

Uri uri = Uri.parse("android.resource://com.package.app/" +
R.raw.sound1);
RingtoneManager.setActualDefaultRingtoneUri(this,
RingtoneManager.TYPE_RINGTONE, uri);

I've noticed also some people had the same problem but got no answers.
Do any of you guys have any idea of how making this work? (without
having to copy the file to the sdcard)

Cheers

-- 

2. Anyway to check if any items on the history/activity stack?

Hi,

I'm trying to figure out if there's any way to see if there is
anything on the history stack so I can programatically display a Back
button or not.

I tried getting the RunningTaskInfo to get the num of activities but
it doesn't seem to work quite right for what I need. Does anyone know
of another way?

Sammy

-- 

3. Can anyone tell me ONE app that shows up in Android Market on HTC Tattoo

4. Help! How to create tiled drawable from xml? (Poor documentation of this on the official developer site)

5. How to get all contact's name phone number, email for 2.0

6. Why is "LABEL" an invalid column for a ContactMethod?

7. Is the Drawable.createFromStream(..) thread-safe?