2019-04-19 09:11:17 -04:00
|
|
|
|
using Bit.Core.Enums;
|
2019-05-17 14:34:00 -04:00
|
|
|
|
using Bit.Core.Models.View;
|
2019-04-19 09:11:17 -04:00
|
|
|
|
using System.Threading.Tasks;
|
2019-04-09 23:33:12 -04:00
|
|
|
|
|
|
|
|
|
namespace Bit.App.Abstractions
|
2019-04-09 23:24:03 -04:00
|
|
|
|
{
|
|
|
|
|
public interface IDeviceActionService
|
|
|
|
|
{
|
2019-04-19 09:11:17 -04:00
|
|
|
|
DeviceType DeviceType { get; }
|
2019-04-09 23:24:03 -04:00
|
|
|
|
void Toast(string text, bool longDuration = false);
|
|
|
|
|
bool LaunchApp(string appName);
|
2019-04-09 23:33:12 -04:00
|
|
|
|
Task ShowLoadingAsync(string text);
|
|
|
|
|
Task HideLoadingAsync();
|
2019-04-29 16:09:27 -04:00
|
|
|
|
bool OpenFile(byte[] fileData, string id, string fileName);
|
|
|
|
|
bool CanOpenFile(string fileName);
|
|
|
|
|
Task ClearCacheAsync();
|
2019-05-10 23:43:35 -04:00
|
|
|
|
Task SelectFileAsync();
|
2019-05-09 11:44:27 -04:00
|
|
|
|
Task<string> DisplayPromptAync(string title = null, string description = null, string text = null,
|
2019-05-16 15:54:21 -04:00
|
|
|
|
string okButtonText = null, string cancelButtonText = null, bool numericKeyboard = false);
|
2019-05-15 13:09:49 -04:00
|
|
|
|
void RateApp();
|
2019-05-17 09:45:07 -04:00
|
|
|
|
bool SupportsFaceId();
|
2019-05-17 12:03:35 -04:00
|
|
|
|
bool SupportsNfc();
|
|
|
|
|
bool SupportsCamera();
|
|
|
|
|
bool SupportsAutofillService();
|
2019-05-17 13:46:32 -04:00
|
|
|
|
int SystemMajorVersion();
|
|
|
|
|
string SystemModel();
|
2019-05-17 14:04:16 -04:00
|
|
|
|
Task<string> DisplayAlertAsync(string title, string message, string cancel, params string[] buttons);
|
2019-05-17 14:34:00 -04:00
|
|
|
|
void Autofill(CipherView cipher);
|
|
|
|
|
void CloseAutofill();
|
|
|
|
|
void Background();
|
2019-05-30 14:13:02 -04:00
|
|
|
|
bool AutofillAccessibilityServiceRunning();
|
|
|
|
|
bool AutofillServiceEnabled();
|
|
|
|
|
string GetBuildNumber();
|
2019-06-03 12:05:18 -04:00
|
|
|
|
void OpenAccessibilitySettings();
|
|
|
|
|
void OpenAutofillSettings();
|
2019-04-09 23:24:03 -04:00
|
|
|
|
}
|
2019-05-17 12:03:35 -04:00
|
|
|
|
}
|