1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-26 13:13:28 +00:00

New Android attachment handling to support saving or opening attachments (#751)

* New Android attachment handling to support saving or opening (when available) attachments

* Simplified options dialog logic & changed error text
This commit is contained in:
Matt Portune
2020-03-02 22:14:14 -05:00
committed by GitHub
parent 70c49922b0
commit 2b1d186611
5 changed files with 126 additions and 15 deletions

View File

@@ -230,15 +230,8 @@ namespace Bit.Droid.Services
string mimeType = MimeTypeMap.Singleton.GetMimeTypeFromExtension(extension);
if(mimeType == null)
{
if(extension == "json")
{
// Explicit support for json since older versions of Android don't recognize the extension
mimeType = "text/json";
}
else
{
return false;
}
// Unable to identify so fall back to generic "any" type
mimeType = "*/*";
}
var intent = new Intent(Intent.ActionCreateDocument);