Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.
TypeScript adeagent-ideai-agentsautomationbotclaude-codecodexghosttygrok-bothermes-agentmobile-appmuseopenclawopencodeorchestrationpiruntimeterminalworktreesyc-backed
import { createPermissionHook } from 'expo-modules-core'
import { useEffect, useSyncExternalStore } from 'react'
import {
getMicrophonePermissionsAsync,
isRecording,
requestMicrophonePermissionsAsync
} from './core'
import { ExpoTwoWayAudioEventMap, addExpoTwoWayAudioEventListener } from './events'
export const useMicrophonePermissions = createPermissionHook({
getMethod: getMicrophonePermissionsAsync,
requestMethod: requestMicrophonePermissionsAsync
})
// Stable listener identities avoid useSyncExternalStore resubscriptions on every render.
const subscribeToRecordingChanges = (cb: () => void) => {
const sub = addExpoTwoWayAudioEventListener('onRecordingChange', cb)
return () => sub.remove()
}
const getRecordingSnapshot = () => isRecording()
const getServerRecordingSnapshot = () => false
export function useIsRecording() {
return useSyncExternalStore(
subscribeToRecordingChanges,
getRecordingSnapshot,
getServerRecordingSnapshot
)
}
export function useExpoTwoWayAudioEventListener<K extends keyof ExpoTwoWayAudioEventMap>(
eventName: K,
listener: (ev: ExpoTwoWayAudioEventMap[K]) => void
) {
useEffect(() => {
const sub = addExpoTwoWayAudioEventListener(eventName, listener)
return () => sub.remove()
}, [eventName, listener])
}