android auto support

This commit is contained in:
Boof2015
2026-06-29 14:07:58 -04:00
parent 3558ea30e4
commit de7ad39d62
31 changed files with 2259 additions and 39 deletions
+29
View File
@@ -0,0 +1,29 @@
import { requireOptionalNativeModule, type NativeModule } from 'expo-modules-core';
import type { PlaybackState } from '@/types/audio';
export interface AstraCarNowPlayingState {
title?: string | null;
artist?: string | null;
album?: string | null;
/** Local cached artwork file name; native builds a content:// URI from it. */
artworkHash?: string | null;
/** Remote server cover id (Subsonic/Jellyfin); used with artworkSourceKey. */
artworkSourceId?: string | null;
/** Remote source row id (remote_sources.id) that owns artworkSourceId. */
artworkSourceKey?: number | null;
playbackState: PlaybackState;
hasTrack: boolean;
duration?: number | null;
position?: number | null;
}
declare class AstraCarModuleType extends NativeModule {
setNowPlaying(state: AstraCarNowPlayingState): void;
}
const native = requireOptionalNativeModule<AstraCarModuleType>('AstraCar');
export const AstraCar = (native ?? {
setNowPlaying: () => {},
}) as AstraCarModuleType;