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>
Try putting the icon on the <activity>
element, instead of (or in addition to) on the <intent-filter>
elements.
精彩评论