2019-04-19 15:11:17 +02:00
|
|
|
|
using Bit.Core.Enums;
|
2019-05-17 20:34:00 +02:00
|
|
|
|
using Bit.Core.Models.View;
|
2019-04-19 15:11:17 +02:00
|
|
|
|
using System.Threading.Tasks;
|
2019-04-10 05:33:12 +02:00
|
|
|
|
|
|
|
|
|
namespace Bit.App.Abstractions
|
2019-04-10 05:24:03 +02:00
|
|
|
|
{
|
|
|
|
|
public interface IDeviceActionService
|
|
|
|
|
{
|
2019-09-04 17:52:32 +02:00
|
|
|
|
string DeviceUserAgent { get; }
|
2019-04-19 15:11:17 +02:00
|
|
|
|
DeviceType DeviceType { get; }
|
2019-04-10 05:24:03 +02:00
|
|
|
|
void Toast(string text, bool longDuration = false);
|
|
|
|
|
bool LaunchApp(string appName);
|
2019-04-10 05:33:12 +02:00
|
|
|
|
Task ShowLoadingAsync(string text);
|
|
|
|
|
Task HideLoadingAsync();
|
2019-04-29 22:09:27 +02:00
|
|
|
|
bool OpenFile(byte[] fileData, string id, string fileName);
|
2020-02-14 22:10:58 +01:00
|
|
|
|
bool SaveFile(byte[] fileData, string id, string fileName, string contentUri);
|
2019-04-29 22:09:27 +02:00
|
|
|
|
bool CanOpenFile(string fileName);
|
|
|
|
|
Task ClearCacheAsync();
|
2019-05-11 05:43:35 +02:00
|
|
|
|
Task SelectFileAsync();
|
2019-05-09 17:44:27 +02:00
|
|
|
|
Task<string> DisplayPromptAync(string title = null, string description = null, string text = null,
|
2019-06-11 05:18:34 +02:00
|
|
|
|
string okButtonText = null, string cancelButtonText = null, bool numericKeyboard = false,
|
2021-05-21 15:13:54 +02:00
|
|
|
|
bool autofocus = true, bool password = false);
|
2019-05-15 19:09:49 +02:00
|
|
|
|
void RateApp();
|
2019-10-23 15:11:48 +02:00
|
|
|
|
bool SupportsFaceBiometric();
|
|
|
|
|
Task<bool> SupportsFaceBiometricAsync();
|
2019-05-17 18:03:35 +02:00
|
|
|
|
bool SupportsNfc();
|
|
|
|
|
bool SupportsCamera();
|
|
|
|
|
bool SupportsAutofillService();
|
2019-05-17 19:46:32 +02:00
|
|
|
|
int SystemMajorVersion();
|
|
|
|
|
string SystemModel();
|
2019-05-17 20:04:16 +02:00
|
|
|
|
Task<string> DisplayAlertAsync(string title, string message, string cancel, params string[] buttons);
|
2020-05-29 18:26:36 +02:00
|
|
|
|
Task<string> DisplayActionSheetAsync(string title, string cancel, string destruction, params string[] buttons);
|
2019-05-17 20:34:00 +02:00
|
|
|
|
void Autofill(CipherView cipher);
|
|
|
|
|
void CloseAutofill();
|
|
|
|
|
void Background();
|
2019-05-30 20:13:02 +02:00
|
|
|
|
bool AutofillAccessibilityServiceRunning();
|
2020-01-10 16:20:19 +01:00
|
|
|
|
bool AutofillAccessibilityOverlayPermitted();
|
2019-05-30 20:13:02 +02:00
|
|
|
|
bool AutofillServiceEnabled();
|
2020-11-17 15:37:57 +01:00
|
|
|
|
void DisableAutofillService();
|
|
|
|
|
bool AutofillServicesEnabled();
|
2019-05-30 20:13:02 +02:00
|
|
|
|
string GetBuildNumber();
|
2019-06-03 18:05:18 +02:00
|
|
|
|
void OpenAccessibilitySettings();
|
2020-01-10 16:20:19 +01:00
|
|
|
|
void OpenAccessibilityOverlayPermissionSettings();
|
2019-06-03 18:05:18 +02:00
|
|
|
|
void OpenAutofillSettings();
|
2020-12-14 21:29:30 +01:00
|
|
|
|
long GetActiveTime();
|
2021-03-31 16:19:05 +02:00
|
|
|
|
void CloseMainApp();
|
2021-08-30 18:44:12 +02:00
|
|
|
|
bool SupportsFido2();
|
2022-02-17 23:34:22 +01:00
|
|
|
|
float GetSystemFontSizeScale();
|
2019-04-10 05:24:03 +02:00
|
|
|
|
}
|
2019-05-17 18:03:35 +02:00
|
|
|
|
}
|