Android intent filter for a particular file extension?

后端 未结 15 1565
我寻月下人不归
我寻月下人不归 2020-11-22 16:04

I want to be able to download a file with a particular extension from the \'net, and have it passed to my application to deal with it, but I haven\'t been able to figure out

15条回答
  •  青春惊慌失措
    2020-11-22 16:39

    None of the above work properly, for VIEW or SEND actions, if the suffix is not registered with a MIME type in Android's system=wide MIME database. The only settings I've found that fire for the specified suffix include android:mimeType="*/*", but then the action fires for ALL files. Clearly NOT what you want!

    I can't find any proper solution without adding the mime and suffix to the Android mime database, so far, I haven't found a way to do that. If anyone knows, a pointer would be terrific.

提交回复
热议问题