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

Function appSwitcherCommand

src/commands/system/runtime/system.ts:306–320  ·  view source on GitHub ↗
(runtime, options = {})

Source from the content-addressed store, hash-verified

304 SystemAppSwitcherCommandOptions | undefined,
305 SystemAppSwitcherCommandResult
306> = async (runtime, options = {}): Promise<SystemAppSwitcherCommandResult> => {
307 if (!runtime.backend.openAppSwitcher) {
308 throw new AppError(
309 'UNSUPPORTED_OPERATION',
310 'system.appSwitcher is not supported by this backend',
311 );
312 }
313 const backendResult = await runtime.backend.openAppSwitcher(toBackendContext(runtime, options));
314 const formattedBackendResult = toBackendResult(backendResult);
315 return {
316 kind: 'appSwitcherOpened',
317 ...(formattedBackendResult ? { backendResult: formattedBackendResult } : {}),
318 ...successText('Opened app switcher'),
319 };
320};
321
322function requireOrientation(orientation: BackendDeviceOrientation): BackendDeviceOrientation {
323 switch (orientation) {

Callers

nothing calls this directly

Calls 3

toBackendContextFunction · 0.90
toBackendResultFunction · 0.90
successTextFunction · 0.90

Tested by

no test coverage detected