dynamicsmobile
Version:
Allows development of off-line mobile and web business apps over the Dynamics Mobile platform. More info on https://www.dynamicsmobile.com
64 lines (63 loc) • 2.13 kB
TypeScript
import { PlatformType } from '../platform/dms-platform-type';
import { CoreAppService } from './app-service-app';
import { DmsApplicationService } from './application-context-service';
import { PrintService } from "../lib-core/print-service";
export type Location = {
latitude: number;
longitude: number;
speed: number;
accuracy: number;
};
export type DeviceInfo = {
platform: string;
version: string;
isDevice: boolean;
isBrowser: boolean;
isWebview: boolean;
shellver: string;
webViewVersion: string;
sdkVersion: string;
sdkDate: string;
};
export declare abstract class LocationServiceInterface {
useFakeLocation: boolean;
abstract get(precision: number): Promise<Location>;
}
export declare class LocationService extends CoreAppService {
useFakeLocation: boolean;
get(precision: number): Promise<Location>;
}
export declare class DeviceService {
protected dms: DmsApplicationService;
protected printManager: PrintService;
location: LocationServiceInterface;
constructor(dms: DmsApplicationService, printManager: PrintService);
logOut(): Promise<any>;
sync(): Promise<void>;
hideOnScreenKeyboard(): Promise<void>;
isNFCSupported(): Promise<boolean>;
readNFCTag(): Promise<Object>;
getIPAddress(): Promise<string>;
barcodeScan(): Promise<{
content: string;
success: boolean;
message: string;
format: string;
}>;
getPlatformType(): PlatformType;
getInfo(): Promise<DeviceInfo>;
openWebBrowser(url: string): Promise<void>;
shareContent(content: string, _mime: string): Promise<void>;
sendEmail(recipient: string, _subject: string, content: string, attachment: string, sender?: string): Promise<void>;
takePicture(): Promise<{
url: string;
}>;
selectPicture(): Promise<{
url: string;
}>;
getBTDevices(): Promise<string[]>;
beepOk(): Promise<void>;
beepError(): Promise<void>;
beepDoubleOk(): Promise<void>;
logEvent(level: 'INFO' | 'WARN' | 'ERROR', message: string, user?: string, metricValue?: number): void;
}