Hi - When I connect my phone to a car through Android Auto and choose the Qari and the Surah, the application streams the Surah from the internet. Since I have already downloaded the all Surahs for multiple Qaris, and it works fine on my mobile.
Can you please support Android Auto to read from the offline storage if the Surah for the selected Qari is downloaded and available?
// Check if Surah for Qari is already downloaded.
val offlineSurahUri = surahContentProvider.getOfflineSurahUri(qari, surah)
// If Surah not available, then stream
val surahUri = if (offlineSurahUri != null) offlineSurahUri else baseUrl + makeThreeDigit(sura) + ".$extension"
MediaItem.Builder()
.setMediaId("sura_${sura}_${qari.id}")
.setMediaMetadata(
MediaMetadata.Builder()
.setIsBrowsable(false)
.setIsPlayable(true)
.setTitle(suraName)
.setDisplayTitle(suraName)
.setTrackNumber(sura)
.setTotalTrackCount(114)
.setArtist(qariName)
.apply {
if (showQariSubtitle) setSubtitle(qariName)
setArtworkUri(artworkUri)
}
.build()
)
.setMimeType(mimeType)
.setUri(surahUri)
.build()
Jazak Allah Khair
Hi - When I connect my phone to a car through Android Auto and choose the Qari and the Surah, the application streams the Surah from the internet. Since I have already downloaded the all Surahs for multiple Qaris, and it works fine on my mobile.
Can you please support Android Auto to read from the offline storage if the Surah for the selected Qari is downloaded and available?
Jazak Allah Khair