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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,5 +35,6 @@
|
||||
public const string LastSync = "other:lastSync";
|
||||
|
||||
public const int SelectFileRequestCode = 42;
|
||||
public const int SelectFilePermissionRequestCode = 43;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
};
|
||||
|
||||
9
src/App/Resources/AppResources.Designer.cs
generated
9
src/App/Resources/AppResources.Designer.cs
generated
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user