Open hgourvest opened 1 year ago
If you add a specific mime type instead of */* does the functionality work?
It makes no difference.
The issue is that we use https://developer.android.com/reference/android/webkit/MimeTypeMap#getMimeTypeFromExtension(java.lang.String) to convert the file extension to a MIME type for resolving the ACTION_SEND intent, and .cb7 and .cbt are custom file extensions that cannot be mapped to a MIME type. I verified .7z and .tar work. We can make custom file extensions work by mapping any unknown file extension to */*
. Just make sure your intent filter supports */*
since we can't map to custom MIME types like "application/x-cb7". This update will be in our 2306 release.
I see, thanks for taking the time to investigate.
As an alternative, I suggest mapping the unknown extensions to the "application/octet-stream" mime type.
https://developer.android.com/reference/android/content/Intent#ACTION_SEND says to "use */*
if the MIME type is unknown (this will only allow senders that can handle generic data streams)."
Steps to reproduce
I checked whether I could perform a drag-and-drop operation with the file types supported by my application, which is a comic book reader. It appears that two file types are not supported by WSA. I used the filter below to capture the mime types sent. No event is sent for files with extension .cb7 or .cbt
✔️ Expected Behavior
I expect to receive an event for files with extension cb7 and cbt
here's the definition of the file types I expect to open
".cb7" (ComicBook in 7z format), mime type: "application/x-cb7" ".cbt" (ComicBook in tar format), mime type: "application/x-cbt"
❌ Actual Behavior
I'm not receiving any events in my application
Other Software
No response
Please specify the version of Windows Subsystem for Android
2305.40000.5.0