-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from tomdye/carplay-v14
- Loading branch information
Showing
81 changed files
with
10,524 additions
and
1,044 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"name": "test2", | ||
"displayName": "test2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
example/ios/test2.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>PreviewsEnabled</key> | ||
<false/> | ||
</dict> | ||
</plist> |
62 changes: 31 additions & 31 deletions
62
example/ios/test2/Images.xcassets/AppIcon.appiconset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,53 @@ | ||
{ | ||
"images" : [ | ||
"images": [ | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "2x", | ||
"size" : "20x20" | ||
"idiom": "iphone", | ||
"scale": "2x", | ||
"size": "20x20" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "3x", | ||
"size" : "20x20" | ||
"idiom": "iphone", | ||
"scale": "3x", | ||
"size": "20x20" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "2x", | ||
"size" : "29x29" | ||
"idiom": "iphone", | ||
"scale": "2x", | ||
"size": "29x29" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "3x", | ||
"size" : "29x29" | ||
"idiom": "iphone", | ||
"scale": "3x", | ||
"size": "29x29" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "2x", | ||
"size" : "40x40" | ||
"idiom": "iphone", | ||
"scale": "2x", | ||
"size": "40x40" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "3x", | ||
"size" : "40x40" | ||
"idiom": "iphone", | ||
"scale": "3x", | ||
"size": "40x40" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "2x", | ||
"size" : "60x60" | ||
"idiom": "iphone", | ||
"scale": "2x", | ||
"size": "60x60" | ||
}, | ||
{ | ||
"idiom" : "iphone", | ||
"scale" : "3x", | ||
"size" : "60x60" | ||
"idiom": "iphone", | ||
"scale": "3x", | ||
"size": "60x60" | ||
}, | ||
{ | ||
"idiom" : "ios-marketing", | ||
"scale" : "1x", | ||
"size" : "1024x1024" | ||
"idiom": "ios-marketing", | ||
"scale": "1x", | ||
"size": "1024x1024" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
"info": { | ||
"author": "xcode", | ||
"version": 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"info" : { | ||
"version" : 1, | ||
"author" : "xcode" | ||
"info": { | ||
"version": 1, | ||
"author": "xcode" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,67 @@ | ||
import React from 'react'; | ||
import React, { useEffect, useState } from 'react'; | ||
import { Text, View } from 'react-native'; | ||
import 'react-native-gesture-handler'; | ||
import { NavigationContainer } from '@react-navigation/native'; | ||
import {createStackNavigator} from '@react-navigation/stack'; | ||
import {Grid} from './screens/Grid'; | ||
import {List} from './screens/List'; | ||
import {Map} from './screens/Map'; | ||
import {Menu} from './screens/Menu'; | ||
import {Search} from './screens/Search'; | ||
import {VoiceControl} from './screens/VoiceControl'; | ||
import {TabBar} from './screens/TabBar'; | ||
import { createStackNavigator } from '@react-navigation/stack'; | ||
import { Grid } from './screens/Grid'; | ||
import { List } from './screens/List'; | ||
import { Map } from './screens/Map'; | ||
import { Menu } from './screens/Menu'; | ||
import { Search } from './screens/Search'; | ||
import { VoiceControl } from './screens/VoiceControl'; | ||
import { TabBar } from './screens/TabBar'; | ||
import { Contact } from './screens/Contact'; | ||
import { ActionSheet } from './screens/ActionSheet'; | ||
import { Alert } from './screens/Alert'; | ||
import { Information } from './screens/Information'; | ||
import { NowPlaying } from './screens/NowPlaying'; | ||
import { POI } from './screens/POI'; | ||
import { CarPlay } from 'react-native-carplay'; | ||
|
||
const Stack = createStackNavigator(); | ||
|
||
export const App = () => ( | ||
<NavigationContainer> | ||
<Stack.Navigator initialRouteName="Menu"> | ||
<Stack.Screen name="List" component={List} /> | ||
<Stack.Screen name="Search" component={Search} /> | ||
<Stack.Screen name="Contact" component={Contact} /> | ||
<Stack.Screen name="VoiceControl" component={VoiceControl} /> | ||
<Stack.Screen name="Map" component={Map} /> | ||
<Stack.Screen name="TabBar" component={TabBar} /> | ||
<Stack.Screen name="Grid" component={Grid} /> | ||
<Stack.Screen name="ActionSheet" component={ActionSheet} /> | ||
<Stack.Screen name="Alert" component={Alert} /> | ||
<Stack.Screen name="Information" component={Information} /> | ||
<Stack.Screen name="NowPlaying" component={NowPlaying} /> | ||
<Stack.Screen name="POI" component={POI} /> | ||
<Stack.Screen name="Menu" component={Menu} /> | ||
</Stack.Navigator> | ||
</NavigationContainer> | ||
); | ||
export const App = () => { | ||
const [carPlayConnected, setCarPlayConnected] = useState(CarPlay.connected); | ||
|
||
useEffect(() => { | ||
function onConnect() { | ||
setCarPlayConnected(true); | ||
} | ||
|
||
function onDisconnect() { | ||
setCarPlayConnected(false); | ||
} | ||
|
||
CarPlay.registerOnConnect(onConnect); | ||
CarPlay.registerOnDisconnect(onDisconnect); | ||
|
||
return () => { | ||
CarPlay.unregisterOnConnect(onConnect); | ||
CarPlay.unregisterOnDisconnect(onDisconnect); | ||
}; | ||
}); | ||
|
||
return carPlayConnected ? ( | ||
<NavigationContainer> | ||
<Stack.Navigator initialRouteName="Menu"> | ||
<Stack.Screen name="List" component={List} /> | ||
<Stack.Screen name="Search" component={Search} /> | ||
<Stack.Screen name="Contact" component={Contact} /> | ||
<Stack.Screen name="VoiceControl" component={VoiceControl} /> | ||
<Stack.Screen name="Map" component={Map} /> | ||
<Stack.Screen name="TabBar" component={TabBar} /> | ||
<Stack.Screen name="Grid" component={Grid} /> | ||
<Stack.Screen name="ActionSheet" component={ActionSheet} /> | ||
<Stack.Screen name="Alert" component={Alert} /> | ||
<Stack.Screen name="Information" component={Information} /> | ||
<Stack.Screen name="NowPlaying" component={NowPlaying} /> | ||
<Stack.Screen name="POI" component={POI} /> | ||
<Stack.Screen name="Menu" component={Menu} /> | ||
</Stack.Navigator> | ||
</NavigationContainer> | ||
) : ( | ||
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}> | ||
<Text>Please connect Car Play and open the test app</Text> | ||
</View> | ||
); | ||
}; |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.