Class: CarPlayInterface
A controller that manages all user interface elements appearing on your map displayed on the CarPlay screen.
Table of contents
Constructors
Properties
Accessors
Methods
- dismissTemplate
 - enableNowPlaying
 - popTemplate
 - popToRootTemplate
 - popToTemplate
 - presentTemplate
 - pushTemplate
 - registerOnConnect
 - registerOnDisconnect
 - setRootTemplate
 - unregisterOnConnect
 - unregisterOnDisconnect
 
Constructors
constructor
• new CarPlayInterface(): CarPlayInterface
Returns
Defined in
packages/react-native-carplay/src/CarPlay.ts:162 (opens in a new tab)
Properties
bridge
• bridge: InternalCarPlay = RNCarPlay
React Native bridge to the CarPlay interface
Defined in
packages/react-native-carplay/src/CarPlay.ts:146 (opens in a new tab)
connected
• connected: boolean = false
Boolean to denote if carplay is currently connected.
Defined in
packages/react-native-carplay/src/CarPlay.ts:151 (opens in a new tab)
emitter
• emitter: NativeEventEmitter
CarPlay Event Emitter
Defined in
packages/react-native-carplay/src/CarPlay.ts:157 (opens in a new tab)
onConnectCallbacks
• Private onConnectCallbacks: Set<OnConnectCallback>
Defined in
packages/react-native-carplay/src/CarPlay.ts:159 (opens in a new tab)
onDisconnectCallbacks
• Private onDisconnectCallbacks: Set<OnDisconnectCallback>
Defined in
packages/react-native-carplay/src/CarPlay.ts:160 (opens in a new tab)
window
• window: undefined | WindowInformation
Defined in
packages/react-native-carplay/src/CarPlay.ts:152 (opens in a new tab)
Accessors
rootTemplate
• get rootTemplate(): Promise<string>
The current root template in the template navigation hierarchy.
Returns
Promise<string>
Todo
Not implemented yet
Defined in
packages/react-native-carplay/src/CarPlay.ts:277 (opens in a new tab)
topTemplate
• get topTemplate(): Promise<string>
The top-most template in the navigation hierarchy stack.
Returns
Promise<string>
Todo
Not implemented yet
Defined in
packages/react-native-carplay/src/CarPlay.ts:285 (opens in a new tab)
Methods
dismissTemplate
▸ dismissTemplate(animated?): void
Dismisses the current presented template *
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
animated | boolean | true | A Boolean value that indicates whether the system animates the display of transitioning templates. | 
Returns
void
Defined in
packages/react-native-carplay/src/CarPlay.ts:269 (opens in a new tab)
enableNowPlaying
▸ enableNowPlaying(enable?): void
Control now playing template state
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
enable | boolean | true | A Boolean value that indicates whether the system use now playing template. | 
Returns
void
Defined in
packages/react-native-carplay/src/CarPlay.ts:293 (opens in a new tab)
popTemplate
▸ popTemplate(animated?): void
Pops the top template from the navigation stack and updates the display.
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
animated | boolean | true | A Boolean value that indicates whether the system animates the display of transitioning templates. | 
Returns
void
Defined in
packages/react-native-carplay/src/CarPlay.ts:252 (opens in a new tab)
popToRootTemplate
▸ popToRootTemplate(animated?): void
Pops all templates on the stack—except the root template—and updates the display.
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
animated | boolean | true | A Boolean value that indicates whether the system animates the display of transitioning templates. | 
Returns
void
Defined in
packages/react-native-carplay/src/CarPlay.ts:244 (opens in a new tab)
popToTemplate
▸ popToTemplate(targetTemplate, animated?): void
Pops templates until the specified template is at the top of the navigation stack.
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
targetTemplate | PushableTemplates | undefined | The template that you want at the top of the stack. The template must be on the navigation stack before calling this method. | 
animated | boolean | true | A Boolean value that indicates whether the system animates the display of transitioning templates. | 
Returns
void
Defined in
packages/react-native-carplay/src/CarPlay.ts:236 (opens in a new tab)
presentTemplate
▸ presentTemplate(templateToPresent, animated?): void
presents a presentable template, alert / action / voice
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
templateToPresent | PresentableTemplates | undefined | The presentable template to present | 
animated | boolean | true | A Boolean value that indicates whether the system animates the display of transitioning templates. | 
Returns
void
Defined in
packages/react-native-carplay/src/CarPlay.ts:261 (opens in a new tab)
pushTemplate
▸ pushTemplate(templateToPush, animated?): void
Pushes a template onto the navigation stack and updates the display.
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
templateToPush | PushableTemplates | undefined | The template to push onto the navigation stack. | 
animated | boolean | true | Set TRUE to animate the presentation of the template. | 
Returns
void
Defined in
packages/react-native-carplay/src/CarPlay.ts:227 (opens in a new tab)
registerOnConnect
▸ registerOnConnect(callback): void
Fired when CarPlay is connected to the device.
Parameters
| Name | Type | 
|---|---|
callback | OnConnectCallback | 
Returns
void
Defined in
packages/react-native-carplay/src/CarPlay.ts:194 (opens in a new tab)
registerOnDisconnect
▸ registerOnDisconnect(callback): void
Fired when CarPlay is disconnected from the device.
Parameters
| Name | Type | 
|---|---|
callback | OnDisconnectCallback | 
Returns
void
Defined in
packages/react-native-carplay/src/CarPlay.ts:205 (opens in a new tab)
setRootTemplate
▸ setRootTemplate(rootTemplate, animated?): void
Sets the root template, starting a new stack for the template navigation hierarchy.
Parameters
| Name | Type | Default value | Description | 
|---|---|---|---|
rootTemplate | TabBarTemplate | PushableTemplates | undefined | The root template. Replaces the current rootTemplate, if one exists. | 
animated | boolean | true | Set TRUE to animate the presentation of the root template; ignored if there isn't a current rootTemplate. | 
Returns
void
Defined in
packages/react-native-carplay/src/CarPlay.ts:218 (opens in a new tab)
unregisterOnConnect
▸ unregisterOnConnect(callback): void
Parameters
| Name | Type | 
|---|---|
callback | OnConnectCallback | 
Returns
void
Defined in
packages/react-native-carplay/src/CarPlay.ts:198 (opens in a new tab)
unregisterOnDisconnect
▸ unregisterOnDisconnect(callback): void
Parameters
| Name | Type | 
|---|---|
callback | OnDisconnectCallback | 
Returns
void
Defined in
packages/react-native-carplay/src/CarPlay.ts:209 (opens in a new tab)