All the build errors
Opened this issue · 3 comments
MulverineX commented
MulverineX commented
tried going into module settings, depends, and adding in com.android.support:support-v4, but I still get the error
MulverineX commented
I isolated the first issue: android / cap cord plug / > build.gradle | depends + 'implementation "com.android.support:support-v4:27.1.0"'
MulverineX commented
Buuut I found another issue, I get an error "Cannot read property 'create' of undefined".
I have ran this code:
try {
cordova.plugin.MediaControls.destroy();
} catch (e) {}
let session = {
track: this.$data.currentSong.song.title,
artist: this.$data.currentSong.song.artists.join(" & "),
cover: this.$data.currentSong.song.album.art[this.$data.currentSong.song.album.art.length - 1],
isPlaying: this.$data.player.paused,
hasPrev: this.$data.queue ? false : true,
hasNext: this.$data.queue ? false : true,
// iOS
album: this.$data.currentSong.song.album.title,
duration: Math.floor(this.$data.player.duration),
elapsed: 0,
hasScrubbing: true,
// Android
ticker: '', // displayed in the status bar on creation
notificationIcon: 'media_play' // android/res/drawable* folders
}
console.log(session);
cordova.plugin.MediaControls.create(session)
I also tried MediaSession, that did not work either.