1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-06 10:34:07 +00:00

Add support for camera for android choose file

This commit is contained in:
Kyle Spearrin
2017-07-22 21:06:53 -04:00
parent f9d336a3a6
commit 395545f7b1
14 changed files with 271 additions and 622 deletions

View File

@@ -1,4 +1,5 @@
using System;
using System.Threading.Tasks;
namespace Bit.App.Abstractions
{
@@ -7,7 +8,7 @@ namespace Bit.App.Abstractions
void CopyToClipboard(string text);
bool OpenFile(byte[] fileData, string id, string fileName);
bool CanOpenFile(string fileName);
void SelectFile();
Task SelectFileAsync();
void ClearCache();
}
}

View File

@@ -35,5 +35,6 @@
public const string LastSync = "other:lastSync";
public const int SelectFileRequestCode = 42;
public const int SelectFilePermissionRequestCode = 43;
}
}

View File

@@ -55,7 +55,7 @@ namespace Bit.App.Pages
var selectButton = new ExtendedButton
{
Text = AppResources.ChooseFile,
Command = new Command(() => _deviceActiveService.SelectFile()),
Command = new Command(async () => await _deviceActiveService.SelectFileAsync()),
Style = (Style)Application.Current.Resources["btn-primaryAccent"],
FontSize = Device.GetNamedSize(NamedSize.Medium, typeof(Button))
};

View File

@@ -1051,6 +1051,15 @@ namespace Bit.App.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to File Source.
/// </summary>
public static string FileSource {
get {
return ResourceManager.GetString("FileSource", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Fingerprint.
/// </summary>

View File

@@ -983,4 +983,7 @@
<data name="NoAttachments" xml:space="preserve">
<value>There are no attachments.</value>
</data>
<data name="FileSource" xml:space="preserve">
<value>File Source</value>
</data>
</root>