This has been discussed in general previously, but I now have a specific case. My app opens a particular app-specific file type (.gedstar), which is actually a SQLite database and generally handled as application/octet-stream with a pathPattern qualifier. This is my Intent definition:
<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="file"
android:mimeType="application/octet-stream"
android:pathPattern=".*\\.gedstar"
android:host="*" />
</intent-filter>
<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="file"
android:mimeType="*/*"
android:pathPattern=".*\\.gedstar"
android:host="*" />
</intent-filter>
(I've had it with and without the wildcarded mimeType, BTW). Up to now, I've been recommending the use of Dropbox to transfer the file from the user's PC to Android and launch my app, and this has been working well up until recently. Then, with the release of the Dropbox V2.0 app, it broke, resulting in the toast message about not having an app for this file type.
Trapping it with Logcat, this is the intent that does NOT work, which looks to me like it should:
I/ActivityManager( 97): Starting activity: Intent { act=android.intent.action.VIEW dat=file:///mnt/sdcard/Android/data/com.dropbox.android/files/scratch/GedStar%20Pro/Gordon.gedstar typ=application/octet-stream flg=0x10000003 (has extras) }
The strange thing is that I can download this same file using Dropbox's browser interface, then go to the browser's list of downloads and launch it successfully. Here is the SUCCESSFUL intent:
I/ActivityManager( 97): Starting activity: Intent { act=android.intent.action.VIEW dat=file:///mnt/sdcard/download/Gordon.gedstar typ=application/octet-stream flg=0x10000000 cmp=com.ghcssoftware.gedstar/.GedStar }
The only differences I see are the value of "flg" and the "cmp=" value which I assume is because the ActivityManager found a matching intent. Can anyone explain this more fully?
%20. Try downloading the file in DropBox in a way that does not have a space in it. I haven't examined the DropBox external storage file structure, but I am guessing that "GedStar Pro" is a folder. - CommonsWare