Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
import { Platform } from 'react-native';
import { requireOptionalNativeModule } from 'expo-modules-core';
interface NativeInstallSource {
/** Absent on binaries released before the Play routing fix. */
installerPackageName?: () => string | null;
}
const native = Platform.OS === 'android'
? requireOptionalNativeModule<NativeInstallSource>('CindyAppInstaller') : null;
/** Read the installed package's source, rather than a value mutable by JS OTA. */
export function isGooglePlayInstallation(): boolean {
try {
return native?.installerPackageName?.() === 'com.android.vending';
} catch {
return false;
}
}