Diese Schnittstelle behandelt tiefe Verlinkungen sowohl in eingehender als auch in ausgehender Richtung. Eingehende tiefe Verlinkungen weisen die App an, von anderen Apps angeforderte Aktionen auszuführen. Ausgehende tiefe Verlinkungen weisen andere Apps an, Aktionen auszuführen.
// Information used to invoke the default SMS app
interface SmsInfo {
phoneNumber?: string;
body?: string;
}
// Information used to invoke the default email app
interface EmailInfo {
to?: string[];
cc?: string[];
bcc?: string[];
subject?: string;
body?: string;
}
// Error returned by promise if the request fails
interface LinkingErrorInfo {
code: LinkingError;
url: string;
error?: string;
}
enum LinkingErrorCode {
NoAppFound = 0,
UnexpectedFailure = 1,
Blocked = 2,
InitialUrlNotFound = 3
}
// Returns the URL that was used to launch the application
getInitialUrl(): SyncTasks.Promise<string>;
// Requests the URL to be opened by the default app for that protocol
// (e.g. http or https would typically open the system browser)
openUrl(url: string): SyncTasks.Promise<void>;
// Requests the default SMS app to be invoked
launchSms(smsData: SmsInfo): SyncTasks.Promise<void>;
// Requests the default mail app to be invoked
launchEmail(emailData: EmailInfo): SyncTasks.Promise<void>;
// Triggered when a new deep link request arrives
deepLinkRequestEvent: SubscribableEvent<(url: string) => void>;