incorporate carplay to android build

This commit is contained in:
Violet Caulfield
2025-04-13 08:44:29 -05:00
parent ab8618e869
commit 727bc74fcf
7 changed files with 19 additions and 34 deletions

View File

@@ -15,7 +15,6 @@ import { createWorkletRuntime } from 'react-native-reanimated'
import { SafeAreaProvider } from 'react-native-safe-area-context'
import { NavigationContainer } from '@react-navigation/native'
import { JellifyDarkTheme, JellifyLightTheme } from './components/theme'
import { CarPlay } from 'react-native-carplay'
export const backgroundRuntime = createWorkletRuntime('background')

View File

@@ -1 +0,0 @@
export const CarPlay = null

View File

@@ -1,2 +0,0 @@
import { CarPlay as CarPlayInterface } from 'react-native-carplay'
export const CarPlay = CarPlayInterface

View File

@@ -1,13 +1,9 @@
import { isUndefined } from 'lodash'
import { createContext, ReactNode, SetStateAction, useContext, useEffect, useState } from 'react'
import { CarPlayInterface } from 'react-native-carplay'
import { CarPlay } from 'react-native-carplay'
import Client from '../api/client'
import { CarPlay as NativeCarPlay } from './NativeCarPlay'
// 'react-native-carplay' has also been disabled for android builds in react-native.config.js
const CarPlay = NativeCarPlay as CarPlayInterface | null
const CarPlayNavigation = CarPlay ? require('./CarPlay/Navigation') : null
const CarPlayNowPlaying = CarPlay ? require('./CarPlay/NowPlaying') : null
import CarPlayNavigation from './CarPlay/Navigation'
import CarPlayNowPlaying from './CarPlay/NowPlaying'
interface JellifyContext {
loggedIn: boolean

30
package-lock.json generated
View File

@@ -14,7 +14,7 @@
"@react-native-community/cli": "^15.1.3",
"@react-native-masked-view/masked-view": "^0.3.2",
"@react-navigation/bottom-tabs": "^7.2.0",
"@react-navigation/native": "^7.0.14",
"@react-navigation/native": "^7.1.6",
"@react-navigation/native-stack": "^7.1.1",
"@react-navigation/stack": "^7.1.0",
"@tamagui/config": "^1.124.17",
@@ -5993,12 +5993,12 @@
}
},
"node_modules/@react-navigation/core": {
"version": "7.3.1",
"resolved": "https://registry.npmjs.org/@react-navigation/core/-/core-7.3.1.tgz",
"integrity": "sha512-S3KCGvNsoqVk8ErAtQI2EAhg9185lahF5OY01ofrrD4Ij/uk3QEHHjoGQhR5l5DXSCSKr1JbMQA7MEKMsBiWZA==",
"version": "7.8.5",
"resolved": "https://registry.npmjs.org/@react-navigation/core/-/core-7.8.5.tgz",
"integrity": "sha512-xDUXs6NI6ASiZgf53I7NPG0iJVGClPL5O3r8ddOCkS6fhVmPRun64m2zxUWnPcxtheFNTFfQ1IXH+gcenTcv/w==",
"license": "MIT",
"dependencies": {
"@react-navigation/routers": "^7.1.2",
"@react-navigation/routers": "^7.3.5",
"escape-string-regexp": "^4.0.0",
"nanoid": "3.3.8",
"query-string": "^7.1.3",
@@ -6038,12 +6038,12 @@
}
},
"node_modules/@react-navigation/native": {
"version": "7.0.14",
"resolved": "https://registry.npmjs.org/@react-navigation/native/-/native-7.0.14.tgz",
"integrity": "sha512-Gi6lLw4VOGSWAhmUdJOMauOKGK51/YA1CprjXm91sNfgERWvznqEMw8QmUQx9SEqYfi0LfZhbzpMst09SJ00lw==",
"version": "7.1.6",
"resolved": "https://registry.npmjs.org/@react-navigation/native/-/native-7.1.6.tgz",
"integrity": "sha512-XcfygfHDfAgf2iC4rNBc67Yy0M1aYRGNeNKqja5AJPFZoBQhAEAxKCwHsH4g3qU0zIbzLCthoSl5107dBjoeZw==",
"license": "MIT",
"dependencies": {
"@react-navigation/core": "^7.3.1",
"@react-navigation/core": "^7.8.5",
"escape-string-regexp": "^4.0.0",
"fast-deep-equal": "^3.1.3",
"nanoid": "3.3.8",
@@ -6072,9 +6072,9 @@
}
},
"node_modules/@react-navigation/routers": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/@react-navigation/routers/-/routers-7.1.2.tgz",
"integrity": "sha512-emdEjpVDK8zbiu2GChC8oYIAub9i/OpNuQJekVsbyFCBz4/TzaBzms38Q53YaNhdIFNmiYLfHv/Y1Ub7KYfm3w==",
"version": "7.3.5",
"resolved": "https://registry.npmjs.org/@react-navigation/routers/-/routers-7.3.5.tgz",
"integrity": "sha512-SBh/3G7pURIQfIwG4OnAfLvq0E4+l1Ii6577z22cIhWIrTOHFXg0rMxC7ft/amzxYn+iG2nYa4dONRd+xIs+yg==",
"license": "MIT",
"dependencies": {
"nanoid": "3.3.8"
@@ -21329,9 +21329,9 @@
}
},
"node_modules/use-sync-external-store": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.4.0.tgz",
"integrity": "sha512-9WXSPC5fMv61vaupRkCKCxsPxBocVnwakBEkMIHHpkTTg6icbJtg6jzgtLDm4bl3cSHAca52rYWih0k4K3PfHw==",
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.5.0.tgz",
"integrity": "sha512-Rb46I4cGGVBmjamjphe8L/UnvJD+uPPtTkNvX5mZgqdbavhI4EbgIWJiIHXJ8bc/i9EQGPRh4DwEURJ552Do0A==",
"license": "MIT",
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"

View File

@@ -28,7 +28,7 @@
"@react-native-community/cli": "^15.1.3",
"@react-native-masked-view/masked-view": "^0.3.2",
"@react-navigation/bottom-tabs": "^7.2.0",
"@react-navigation/native": "^7.0.14",
"@react-navigation/native": "^7.1.6",
"@react-navigation/native-stack": "^7.1.1",
"@react-navigation/stack": "^7.1.0",
"@tamagui/config": "^1.124.17",

View File

@@ -4,11 +4,4 @@ module.exports = {
android: {},
},
assets: ['./assets/fonts/'],
dependencies: {
'react-native-carplay': {
platforms: {
android: null, // Disable autolinking for Android
},
},
},
}