1

I have created a new mimetype, it works very well with file browser, and it open my activity, but it displayed as unknown icon on file browser, I use ASTRO file browser. I have added an icon for the intent, but it still appears as unknown icon this is my code

    <activity android:name=".SharedActivity" android:label="@string/app_name"
        android:screenOrientation="portrait">
        <intent-filter android:icon="@drawable/icon" android:label="swv">
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
        <intent-filter android:icon="@drawable/icon" android:label="swv">
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.BROWSABLE" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:scheme="http" />
            <data android:host="*" />
            <data android:pathPattern=".*\\.swv" />
        </intent-filter>
        <intent-filter android:icon="@drawable/icon" android:label="swv">
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.BROWSABLE" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:scheme="http" />
            <data android:host="*" />
            <data android:mimeType="application/swv" />
        </intent-filter>
        <intent-filter android:icon="@drawable/icon" android:label="swv">
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <data android:scheme="file" />
            <data android:host="*" />
            <data android:pathPattern=".*\\.swv" />
        </intent-filter>

    </activity>

1 Answer 1

0

Try putting the icon on the <activity> element, instead of (or in addition to) on the <intent-filter> elements.

2
  • I have tried it, no result, the icon of swv file is still display as unknown icon, Any another idea???
    – JustMe
    Apr 11, 2011 at 6:25
  • @Gavohab: Ask the folk at ASTRO what they use for the icon. You can also put the icon on <application>, but you probably already have that. Apr 11, 2011 at 11:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.