Open
Description
I have a working react native audio podcast player app, built using React Native Track Player.
My client requested to allow app to run in Android Auto. I came to know about this library. I was exploring, but the main template
NowPlayingTemplate is not working. When i push template the app stop running and closed.
This is my code:
const template = new NowPlayingTemplate({
buttons: [
{
id: 'foo',
type: 'more',
},
{
id: 'demo',
type: 'playback',
},
{
id: 'baz',
type: 'image',
image: require('../images/star.png'),
},
],
albumArtistButtonEnabled: true,
upNextButtonTitle: 'Tester',
upNextButtonEnabled: false,
onUpNextButtonPressed() {
console.log('up next was pressed');
},
onButtonPressed(e) {
console.log(e);
},
});
CarPlay.enableNowPlaying(true);
CarPlay.pushTemplate(template);
Activity