35 lines · 975 B · TypeScript
RawDownload
import Constants from "expo-constants";import { requireOptionalNativeModule } from "expo";import { Platform } from "react-native"; interface AndroidAgentNotifications {  configure(deviceId: string, userId: string, scheme: string, ongoingEnabled: boolean): void;  clear(): void;} const native =  Platform.OS === "android"    ? requireOptionalNativeModule<AndroidAgentNotifications>("T3AgentNotifications")    : null; export function supportsAndroidAgentNotifications(): boolean {  return typeof native?.configure === "function" && typeof native?.clear === "function";} export function configureAndroidAgentNotifications(  deviceId: string,  userId: string,  ongoingEnabled: boolean,): void {  const scheme = Constants.expoConfig?.scheme;  native?.configure?.(    deviceId,    userId,    (Array.isArray(scheme) ? scheme[0] : scheme) ?? "t3code",    ongoingEnabled,  );} export function clearAndroidAgentNotifications(): void {  native?.clear?.();}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t