Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: CBXE6 - Default file extension handler icon not created under APPS. (FIXED)


This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Aug 29, 2014 1:37 AM Last Post By: GAI CHEW KAI
GAI CHEW KAI

Posts: 53
Registered: 7/29/04
CBXE6 - Default file extension handler icon not created under APPS. (FIXED)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 28, 2014 2:42 AM
I am planning to write a custom file format handler, something similar to
Android "Gallery" application with shortcut icon created on the APPS panel
yet can handle by Android OS when tabbed a .JPG file.

However, by adding instructions below to AndroidManifest.template.xml, it cannot
create a shortcut icon under APPS.

However, when tabbed on custom file extension, it is launching the correct file handler.

In this case ".mimos" is the custom file extension:

<intent-filter>
<!--
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file" android:mimeType="/" android:pathPattern=".*
.mimos"/>
-->
</intent-filter>

I want the file handler icon (my application) to be created under APPS panel, the same time
when users tabbed .mimos file, it is able to launch the default .mimos file handler as well.

Please advise.
GAI CHEW KAI

Posts: 53
Registered: 7/29/04
Re: CBXE6 - Default file extension handler icon not created under APPS. (FIXED)  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Aug 29, 2014 1:37 AM   in response to: GAI CHEW KAI in response to: GAI CHEW KAI
...found the answer from the this link:

http://stackoverflow.com/questions/9518318/android-how-to-create-intent-filter-for-custom-file-extension-that-does-not-make

I have to put two <intent-filter> markups as show below to work, but I am not sure why?

<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="file" />
<data android:mimeType="/" />
<data android:pathPattern=".*
.mimos" />
<data android:pathPattern=".mimos." />
<data android:pathPattern=".*m.mimos." />
<data android:pathPattern=".*m.*m.mimos." />
<data android:pathPattern=".*m.*m.*m.mimos." />
<data android:pathPattern=".*m.*m.*m.*m.mimos." />
<data android:host="*" />
</intent-filter>
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02