MCPcopy Index your code
hub / github.com/callstack/agent-device / pollAndroidAlertCandidate

Function pollAndroidAlertCandidate

src/platforms/android/alert.ts:109–120  ·  view source on GitHub ↗
(
  device: DeviceInfo,
  timeoutMs: number,
)

Source from the content-addressed store, hash-verified

107}
108
109async function pollAndroidAlertCandidate(
110 device: DeviceInfo,
111 timeoutMs: number,
112): Promise<AndroidAlertCandidate | null> {
113 const start = Date.now();
114 while (Date.now() - start < timeoutMs) {
115 const candidate = await readAndroidAlertCandidate(device);
116 if (candidate) return candidate;
117 await sleep(ALERT_POLL_INTERVAL_MS);
118 }
119 return null;
120}
121
122async function readAndroidAlertCandidate(
123 device: DeviceInfo,

Callers 2

waitForAndroidAlertFunction · 0.85
handleAndroidAlertActionFunction · 0.85

Calls 2

sleepFunction · 0.90

Tested by

no test coverage detected