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

Function getAndroidSdkInt

src/platforms/android/settings.ts:381–389  ·  view source on GitHub ↗
(device: DeviceInfo)

Source from the content-addressed store, hash-verified

379}
380
381async function getAndroidSdkInt(device: DeviceInfo): Promise<number | null> {
382 const result = await runAndroidAdb(device, ['shell', 'getprop', 'ro.build.version.sdk'], {
383 allowFailure: true,
384 });
385 if (result.exitCode !== 0) return null;
386 const value = Number.parseInt(result.stdout.trim(), 10);
387 if (!Number.isFinite(value) || value <= 0) return null;
388 return value;
389}

Callers 1

Calls 2

runAndroidAdbFunction · 0.90
isFiniteMethod · 0.80

Tested by

no test coverage detected