birkir / react-native-carplay

CarPlay with React Native
https://birkir.dev/react-native-carplay/
MIT License
677 stars 109 forks source link

Function updateTemplate doesn't work #169

Open bitoffluff1 opened 9 months ago

bitoffluff1 commented 9 months ago

Describe the bug I create a MapTemplate in the Android Auto part, and then I want to update the information. For example, the header title. I call updateTemplate with the new config, but the MapTemplate is not updated. My goal is to update an already rendered template in some way. I only found the updateTemplate function for Android. Are there other ways to do this that work?

To Reproduce Steps to reproduce the behavior:

  1. Create any template const config = { component: Map, header: { title: 'mapHeader' }, items: [ { text: 'item-1', id: '2', browsable: true } ], actions: [ { title: 'testAction', type: 'custom', id: 'testAction' } ], }; const mapTemplate = new MapTemplate(config); CarPlay.pushTemplate(mapTemplate);

  2. After a while call updateTemplate with new config mapTemplate.updateTemplate({ ...config, header: { title: 'new title' }, });

The title hasn't changed

Expected behavior Updating an already rendered template

Android Auto (please complete the following information):

purwanto2205 commented 8 months ago

any update?

DigenPrimeApps commented 1 month ago

it is not working for me also!