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

In-app vault export support (#729)

* First pass at vault export UI

* Password validation via cryptoService

* Export service framework

* support for constructing json export data

* Support for constructing csv export data

* Cleanup and simplification

* Completion of vault export feature

* Formatting and simplification

* Use dialog instead of toast for invalid master password entry
This commit is contained in:
Matt Portune
2020-02-14 16:10:58 -05:00
committed by GitHub
parent 7a6fe5ed5f
commit 33df456cfd
31 changed files with 1149 additions and 8 deletions

View File

@@ -201,7 +201,8 @@ namespace Bit.Droid
protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
{
if(requestCode == Constants.SelectFileRequestCode && resultCode == Result.Ok)
if(resultCode == Result.Ok &&
(requestCode == Constants.SelectFileRequestCode || requestCode == Constants.SaveFileRequestCode))
{
Android.Net.Uri uri = null;
string fileName = null;
@@ -222,6 +223,14 @@ namespace Bit.Droid
{
return;
}
if(requestCode == Constants.SaveFileRequestCode)
{
_messagingService.Send("selectSaveFileResult",
new Tuple<string, string>(uri.ToString(), fileName));
return;
}
try
{
using(var stream = ContentResolver.OpenInputStream(uri))